0

I have implemented Admob in my iOS application. Banners, rewarded videos and mediated interstitials (Admob, Unity and Chartboost). The only problem I have is that the app always crash after 3-4 interstitial ads has been presented. The debugger shows this message: Message from debugger: Terminated due to memory issue.

I am 100% sure the crash comes from the Interstitials. I have tested completely without ads, no crash. And only with banner ads, no crash.

This is the code I use to implement and show Interstitial ads:

@interface ViewController ()
@property(nonatomic, strong) GADInterstitial *interstitial;
@end

- (void)viewDidLoad {
    [self loadInterstitial];
}

- (void)loadInterstitial {
    self.interstitial = [[GADInterstitial alloc] initWithAdUnitID:@"ca-app-pub-xxxxx/xxxxx"];
    self.interstitial.delegate = self;
    [self.interstitial loadRequest:[GADRequest request]];
}

- (void)interstitialDidDismissScreen:(GADInterstitial *)interstitial {
    [self loadInterstitial];
}

- (void)someMethod {
    if (self.interstitial.isReady) {
        [self.interstitial presentFromRootViewController:self];
    }
}
Peter
  • 1,848
  • 4
  • 26
  • 44
  • Have you tried changing your interstitial mediation configuration to determine if one of the adapters in particular is the root of the crash? E.g. turning off one network at a time to see if the crash resolves? – RedBrogdon May 29 '17 at 03:31
  • I think I found the solution for my problem. When adding Chartboost to my AdMob Interstitial-campaign, I added the wrong App-ID and App-signature. Don't understand why this caused the memory issues and made my app crash, but when I fixed it the memory issue went away, and the app have not crashed again. – Peter May 29 '17 at 18:58

0 Answers0