- (void)showInterstitial:(UIViewController *)viewController{
NSLog(@"showInterstitial");
if (_interstitial.hasBeenUsed) { [self loadInterstitialAds]; } else if (_interstitial.isReady) { [_interstitial presentFromRootViewController:viewController]; } [[EventTrackerManager defaultManager] registerEvent:[ApplicationDelegate interstitialAdEvent]];}
- (void)loadInterstitialAds{ _interstitial = [[GADInterstitial alloc] init]; _interstitial.delegate = self;
_interstitial.adUnitID = @"your_ad_unit"; GADRequest *request = [GADRequest request]; [_interstitial loadRequest:request];}
#pragma mark - GADInterstitialDelegate
- (void)interstitialDidReceiveAd:(GADInterstitial *)ad{ NSLog(@"interstitialDidReceiveAd %@", ad.adNetworkClassName);}
- (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error{ NSLog(@"didFailToReceiveAdWithError %@", error);}
- (void)interstitialWillPresentScreen:(GADInterstitial *)ad{ NSLog(@"interstitialWillPresentScreen %@", ad.adNetworkClassName);}
- (void)interstitialDidDismissScreen:(GADInterstitial *)ad{ NSLog(@"interstitialDidDisappear"); [self loadInterstitialAds];}
2014-11-13 21:26:50.220 Agroeste[4920:740242] interstitialDidReceiveAd GADMAdapterCustomEvents
2014-11-13 21:27:19.272 Agroeste[4920:740242] showInterstitial
2014-11-13 21:27:25.964 Agroeste[4920:740242] interstitialWillPresentScreen GADMAdapterCustomEvents
2014-11-13 21:27:36.090 Agroeste[4920:740242] interstitialDidDisappear
2014-11-13 21:27:36.315 Agroeste[4920:740242] interstitialDidReceiveAd GADMAdapterAdColony (Loaded AdColony for the first time)
2014-11-13 21:28:00.287 Agroeste[4920:740242] showInterstitial (Display AdColony for the first time)
2014-11-13 21:28:00.292 Agroeste[4920:740242] interstitialWillPresentScreen GADMAdapterAdColony (Display AdColony for the first time)
2014-11-13 21:28:12.339 Agroeste[4920:740242] interstitialDidDisappear
2014-11-13 21:28:12.707 Agroeste[4920:740242] interstitialDidReceiveAd GADMAdapterAdColony (Loaded AdColony for the second time)
2014-11-13 21:28:25.333 Agroeste[4920:740242] showInterstitial (Should have displayed AdColony for the second time, but interstitialWillPresentScreen was not called)
Considerations:
1) else if (_interstitial.isReady): It is returning TRUE
2) viewController is not null
This is a really weird issue. Anybody ever had this issue and how did you fix it?
Thanks.