0
我使用AdMob製作應用程序,事情是:應用程序成功加載廣告,但試圖呈現時,廣告似乎尚未加載。我已經按照在谷歌的AdMob引導...Admob:插頁式廣告尚未準備好呈現,爲什麼? (Swift)
下面是在我viewDidLoad中()
interstitial = GADInterstitial(adUnitID: "ca-app-pub-45863574112xxxxxxxxxx/xxxxxxx")
let request = GADRequest()
interstitial.load(request)
而這上的按鈕時,點擊這裏我稱之爲:
if self.interstitial.isReady {
self.interstitial.present(fromRootViewController: self)
} else {
let alert = UIAlertController(title: "Couldn't load ad", message: "There was a problem while loading the ad... Still, thank you for wanting to support me :)", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok...", style: .cancel, handler: nil))
self.present(alert, animated: true)
}
好吧,我收到警報......你能告訴我爲什麼嗎?