【发布时间】:2013-06-28 17:59:45
【问题描述】:
我想在我的应用程序中添加一些广告,尤其是应用程序进入前台时的插页式广告。
我在我的 AppDelegate.m 中创建了这个方法:
- (void)splashInterstitial
{
UIImage *image;
if (TEST_IPHONE_5) {
image = [UIImage imageNamed:@"Default-568h.png"];
} else {
image = [UIImage imageNamed:@"Default.png"];
}
splashInterstitial_ = [[DFPInterstitial alloc] init];
splashInterstitial_.adUnitID = ADMOBS_OUVERTURE;
[splashInterstitial_ loadAndDisplayRequest:[GADRequest request]
usingWindow:self.window
initialImage:image];
}
我调用了两次:
- 在application:didFinishLaunchingWithOptions:
- 在applicationWillEnterForeground:
在application:didFinishLaunchingWithOptions: 中调用时它工作正常,但在第二种情况下,我有这个错误:
Google 请求错误:无法满足 Google 广告请求 在发生超时之前。
显然,加载需要 5 秒,但我不知道如何强制我的应用程序等待它。
有人知道怎么做吗?
感谢您的帮助。
【问题讨论】:
标签: ios admob interstitial