Admob的插播式广告 - 不能present间隙。这还没有准备好 [英] Admob interstitial ads - Cannot present interstitial. It is not ready

查看:1088
本文介绍了Admob的插播式广告 - 不能present间隙。这还没有准备好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是code正确实施插播式广告?

因为当我启动它,我得到这个,

 <谷歌>不能present间隙。这还没有准备好。
 

解决方案

您需要等到广告加载成功,然后才present它在案件间质性广告。否则,广告不会显示出来。

要做到这一点确认对 GADInterstitialDelegate 的协议和设置您的视图控制器的委托间质性_

  interstitial_.delegate =自我;
 

然后实现 interstitialDidReceiveAd 如下:

   - (无效)interstitialDidReceiveAd:(GADInterstitial *)广告
{
    [interstitial_ presentFromRootViewController:个体经营];
}
 

有关更多参考,请查看插页式广告

Is this code correct to implement an interstitial ad?

Because when I launch it I get this,

<Google> Cannot present interstitial.  It is not ready.

解决方案

You need to wait until the ad loads successfully and only then present it in case of Interstitial ads. Otherwise the ads wont show up.

To do this confirm to the GADInterstitialDelegate protocol and set your view controller as the delegate of interstitial_.

interstitial_.delegate = self;

Then implement interstitialDidReceiveAd as follows.

- (void)interstitialDidReceiveAd:(GADInterstitial *)ad
{
    [interstitial_ presentFromRootViewController:self];
}

For more reference, please check Interstitials ads

这篇关于Admob的插播式广告 - 不能present间隙。这还没有准备好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆