Я пытаюсь проверить MoPub междоузлий с тестовым идентификатором в MoPub учебниках, версия Иоса 10,2, MoPub выходы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 никогда не вызывается. Я думал, что это может быть связано с АТС, так что я добавил следующие ключи к info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
еще не повезло, может кто-то сказать мне, что я, вероятно, делаю неправильно?