Swift2とXcode7を使用してiOSアプリケーションを開発しています。 AdMobを実装しようとしていますが、インタースティシャル広告は表示されません。AdMobインタースティシャルエラー「リクエストエラー:表示する広告がありません」
override func viewDidLoad() {
super.viewDidLoad()
_interstitial = createAndLoadInterstitial()
}
func createAndLoadInterstitial()->GADInterstitial {
let interstitial = GADInterstitial(adUnitID: "interstitial_ID")
let gadRequest:GADRequest = GADRequest()
gadRequest.testDevices = ["test device id"]
interstitial.delegate = self
interstitial?.loadRequest(gadRequest)
return interstitial!
}
func interstitialDidReceiveAd(ad: GADInterstitial!) {
_interstitial?.presentFromRootViewController(self)
}
func interstitial(ad: GADInterstitial!, didFailToReceiveAdWithError error: GADRequestError!) {
print(error.localizedDescription)
}
func interstitialDidDismissScreen(ad: GADInterstitial!) {
_interstitial = createAndLoadInterstitial()
}
私はこのエラーが表示されます。
Request Error: No ad to show.
*リクエストエラー:*を表示する広告はありません.AdMobは広告リクエストを入力できませんでした。再試行する。他のエラーや警告が表示されますか? AdMob SDKのどのバージョンを使用していますか? –
@DanielStorm AdMobをCocoaPods(ポッド 'Google-Mobile-Ads-SDK'、 '〜7.0')にインストールしました。私はもう一度試しましたが、そのエラーだけを受けました。 –
GADBannerViewは通常表示されます... –