gpt4 book ai didi

ios - RevMob 全屏广告在 iOS 上崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:10:16 27 4
gpt4 key购买 nike

<分区>

如果我点击全屏广告并在广告有时间打开 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 采取的是时间采取不会发生的操作...我试图用加载屏幕覆盖广告,但我无法做到...有吗有什么解决办法吗?

--

我有 2 个 iVar 来控制 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];
}];
}

然后,这就是我显示全屏 revmob 广告的方式:

- (BOOL)showFullScreenRevMob{

BOOL didShow = NO;
if (_revMobFullScreenLoaded) {
[_revMobFullScreen showAd];
didShow = YES;
}

//Cache for the next time
[self cacheFullScreenRevMob];

return didShow;
}

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