这是我第一次添加亚马逊插页式广告,当我尝试加载广告时,我在控制台中收到此错误并且广告无法加载。这是控制台中显示的错误,下面是代码。谢谢!
2016-01-26 00:09:08.362 RacingGame[8095:2664641] -canOpenURL: failed for
URL: "about:blank" - error: "(null)"
2016-01-26 00:09:08.499 RacingGame[8095:2664641] -canOpenURL: failed for
URL: "ios-log:%20preloading" - error: "(null)"
2016-01-26 00:09:08.503 RacingGame[8095:2664641] -canOpenURL: failed for
URL: "ios-log:%20in%20update%20viewport" - error: "(null)"
2016-01-26 00:09:08.506 RacingGame[8095:2664641] -canOpenURL: failed for
URL: "ios-log:%20adding%20ios%20viewport" - error: "(null)"
Ad loaded
override func didMoveToView(view: SKView) {
loadAd()
}
func loadAd() {
let interstitialAd = AmazonAdInterstitial()
let adOptions = AmazonAdOptions()
adOptions.isTestRequest = true
interstitialAd.load(adOptions)
interstitialAd.delegate = self
}
//MARK:AmazonAdInterstitialDelegate
func interstitialDidLoad(interstitial: AmazonAdInterstitial!) {
print("Ad loaded")
}
func interstitialDidFailToLoad(interstitial: AmazonAdInterstitial!, withError error: AmazonAdError!) {
print("Interstitial failed to load with error \(error.description)")
}
func interstitialDidPresent(interstitial: AmazonAdInterstitial!) {
print("Interstitial presented")
}
func interstitialWillDismiss(interstitial: AmazonAdInterstitial!) {
print("Interstitial will dismiss")
}