使用 iOS 示例项目 2.5:http://google-mobile-dev.googlecode.com/files/InterstitialExample_iOS_2.5.zip
在 MainController.m
中,我添加了两个方法来调用 showInterstitial
,以便每次应用程序从后台进入前台时,例如
- (void) viewDidLoad {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appWillEnterForegroundNotification) name:UIApplicationWillEnterForegroundNotification object:nil];
}
- (void) appWillEnterForegroundNotification{
[self showInterstitial:nil];
}
第一个方法用于注册 View Controller 的回调以接收进入前台通知,第二个方法在发生这种情况时调用 showInterstitial
方法。我可以看到方法 showInterstitial
确实被调用并且请求确实被触发,但是没有调用成功或错误回调。
有什么想法吗?
最佳答案
这可能不是显示插页式广告的正确时间。您希望应用程序再次处于事件状态,而不是即将处于事件状态。
从尝试 - (void)applicationDidBecomeActive:(UIApplication *)application
关于ios - 从后台进入前台时无法显示admob插页式广告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15141968/