我正在处理以前工作正常的应用程序。我刚刚将revmob集成到了应用程序中。下面是我在app delegate
中实现的代码- (void)showBannerWindow
{
self.bannerWindow = [[RevMobAds session] banner];
[self.bannerWindow loadWithSuccessHandler:^(RevMobBanner *banner) {
[banner showAd];
[self revmobAdDidReceive];
} andLoadFailHandler:^(RevMobBanner *banner, NSError *error) {
[self revmobAdDidFailWithError:error];
} onClickHandler:^(RevMobBanner *banner) {
[self revmobUserClickedInTheAd];}];
}
-(void)removeBannerWindow
{
[self.bannerWindow hideAd];
}
我在各种控制器中使用此app委托方法。我只是隐藏并在推送和弹出中显示revmobwindow横幅广告。
MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate showBannerWindow];
现在每次遇到“setStatus”错误时应用程序都会随机崩溃。
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[CALayer setStatus:]: unrecognized selector sent to instance 0xac51e40'
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[NSURL setStatus:]: unrecognized selector sent to instance 0xafa3530'