2017-06-13 56 views
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) 
     } 

好吧,我收到警报......你能告诉我为什么吗?

回答