I'm working with the Google Mobile Ads SDK on iOS and trying to display some ads. My code:
GADBannerView* bannerView = [[GADBannerView alloc] initWithAdSize:GADAdSizeFromCGSize(CGSizeMake(300, 250))];
bannerView.adUnitID = @"hidden";
bannerView.rootViewController = self;
bannerView.delegate = self;
GADRequest* request = [GADRequest request];
request.testDevices = @[ kGADSimulatorID ];
/// Tells the delegate that an ad request successfully received an ad. The delegate may want to add
/// the banner view to the view hierarchy if it hasn't been added yet.
- (void)adViewDidReceiveAd:(GADBannerView *)bannerView;
Ok, so the problem here was that I didn't keep the reference to the
bannerView. It was deallocated after the method returned, and this is why the delegate methods were not called.