如果我点击一个全屏广告,并在广告有时间打开Safari或AppStore之前关闭它,应用程序就会崩溃,有以下错误:
[RevMob] Initializing Fullscreen.
[RevMob] Ad received: (200).
[RevMob] Fullscreen clicked.
[RevMob] Loading iTunes url.
[RevMob] Fullscreen closed.
[RevMob] Opening iTunes.
***** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'**如果有一个加载屏幕来阻止用户交互,而RevMob需要时间来采取不会发生的操作.我试图用一个加载屏幕覆盖广告,但我无法做到这一点。有什么解决办法吗?
--
I有2 iVars来控制revMob:
RevMobFullscreen* _revMobFullScreen;
BOOL _revMobFullScreenLoaded;我正在预装全屏广告,方式是:
- (void)cacheFullScreenRevMob{
//Get rid of old fullscreen ad and create a new one
//This is need in order to (re)load an fullscreen ad
[_revMobFullScreen release], _revMobFullScreen = nil;
_revMobFullScreen = [[RevMobAds session] fullscreen];
[_revMobFullScreen retain];
//Pre load the ad for the next time
_revMobFullScreenLoaded = NO;
[_revMobFullScreen loadWithSuccessHandler:^(RevMobFullscreen *fs) {
_revMobFullScreenLoaded = YES;
} andLoadFailHandler:^(RevMobFullscreen *fs, NSError *error) {
_revMobFullScreenLoaded = NO;
} onClickHandler:nil onCloseHandler:^{
[self postNotificationOnMainThreadFullAdDidFinish];
}];
},然后,我就这样显示了一个全屏翻版广告:
- (BOOL)showFullScreenRevMob{
BOOL didShow = NO;
if (_revMobFullScreenLoaded) {
[_revMobFullScreen showAd];
didShow = YES;
}
//Cache for the next time
[self cacheFullScreenRevMob];
return didShow;
}发布于 2013-05-09 16:38:53
编辑:作为@Jo o的评论,它是5.6.2版本上的一个bug
https://stackoverflow.com/questions/16452710
复制相似问题