简体   繁体   English

集成revmob后,iOS应用随机崩溃

[英]iOS app Crashes randomly after integrating revmob

I am working on a application which is working fine previously. 我正在开发以前运行良好的应用程序。 I just integrated the revmob into the application. 我只是将revmob集成到应用程序中。 Below is the code that i implemented in the the 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];
}   

I am using this app delegate method in the various controller. 我在各种控制器中使用此应用程序委托方法。 I am just hiding and Showing the revmobwindow banner ads on push and pop. 我只是在推和弹出时隐藏并显示revmobwindow横幅广告。

MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate showBannerWindow];

Now the application crashes randomly every time i getting errors with "setStatus" like the following. 现在,每次出现“ 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'

看起来这是RevMob SDK上的错误( stackoverflow.com/q/21333170/634185

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM