gpt4 book ai didi

ios - Admob 插页式广告 - 无法展示插页式广告。还没准备好

转载 作者:可可西里 更新时间:2023-11-01 06:17:42 25 4
gpt4 key购买 nike

此代码是否可以正确实现插页式广告?

enter image description here

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

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

最佳答案

您需要等到广告加载成功,然后才在插页式广告的情况下展示它。否则广告不会出现。

要做到这一点,请遵守 GADInterstitialDelegate 协议(protocol),并将您的 View Controller 设置为 interstitial_ 的委托(delegate)。

interstitial_.delegate = self;

然后按如下方式实现interstitialDidReceiveAd

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

更多引用请查看Interstitials ads

关于ios - Admob 插页式广告 - 无法展示插页式广告。还没准备好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23097876/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com