1
をロードしない、MoPub出力Mopub間質は、IOSのバージョンが10.2で、私はMoPubチュートリアルでテストIDと格子間をmopubテストしようとしています
2017-01-15 13:47:46.801224 Twit Miner[23775:6627095] MOPUB: Looking for custom event class named MPHTMLInterstitialCustomEvent.
2017-01-15 13:47:46.801321 Twit Miner[23775:6627095] MOPUB: Loading MoPub HTML interstitial
2017-01-15 13:47:46.999975 Twit Miner[23775:6627095] MOPUB: MoPub HTML interstitial did load
しかし、私が表示されているすべてのインタースティシャル広告が表示されません。ログはそう示唆
import UIKit
import MoPub
class ViewController: UIViewController
, MPInterstitialAdControllerDelegate
{
// TODO: Replace this test id with your personal ad unit id
var interstitial: MPInterstitialAdController =
MPInterstitialAdController(forAdUnitId: "77ce0b65cf81438eb255695afe3b1904")
override func viewDidLoad() {
super.viewDidLoad()
self.interstitial.delegate = self
// Pre-fetch the ad up front
self.interstitial.loadAd()
}
func interstitialDidLoadAd(interstitial: MPInterstitialAdController) {
// This sample automatically shows the ad as soon as it's loaded, but
// you can move this showFromViewController call to a time more
// appropriate for your app.
if (interstitial.ready) {
interstitial.showFromViewController(self)
}
}
}
にもかかわらず、私はブレークポイントを置くとき、私はinterstitialDidLoadAdメソッドが呼び出されないさんことに気づいた:あなたは以下の私のコードを見つけることができます。
が<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
はまだ運が、誰かが私はおそらく間違ってやっているものを私に伝えることができません:私は、ATSはので、私はInfo.plistファイルに次のキーを追加し、それが原因かもしれないと思いましたか?