I am having an issue whereby the Admob banner shows, however, when you tap it, it either crashes the app, or does nothing.
It is using admob mediation, split with iAd, if an iAd displays, it can be tapped no problem...
- (void) onEnter {
if (![MKStoreManager featureAPurchased])
{
controller = [[RootViewController alloc]init];
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait];
bannerView_.adUnitID = MY_BANNER_UNIT_ID;
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
CGFloat screenXPos = (screenWidth /2);
CGFloat screenYPos = screenHeight - 25;
[bannerView_ setCenter:CGPointMake(screenXPos, screenYPos)];
bannerView_.rootViewController = controller;
bannerView_.adUnitID = MY_BANNER_UNIT_ID;
bannerView_.rootViewController = controller;
[[[CCDirector sharedDirector]view] addSubview: bannerView_];
[bannerView_ loadRequest:[GADRequest request]];
}else{
bannerView_.hidden = YES;
}
The error is if I try to tap a banner nothing happens, and in the console I see the following error;
Attempt to present <GADBrowserController: 0x1d576ca0> on <RootViewController: 0x1e8ed3f0> whose view is not in the window hierarchy!
Would appreciate any assistance