Question

Hi
After I add GADBannerView, the delegate bannerViewDidLoadAd notice that received new ad, why nothing be showed on the view?

botBanner = [[GADBannerView alloc] initWithAdSize:GADAdSizeFullWidthPortraitWithHeight(50)];
botBanner.adUnitID = kGADKey;
botBanner.delegate = self;
botBanner.rootViewController = self;
[_adBannerBotView addSubview:botBanner];

adRequest = [GADRequest request];

// Make the request for a test ad. Put in an identifier for
// the simulator as well as any devices you want to receive test ads.
adRequest.testDevices = [NSArray arrayWithObjects:@"<I add my device id>", GAD_SIMULATOR_ID, nil];
[botBanner loadRequest:adRequest];
Was it helpful?

Solution

I found the answer, it's really stupid.
Post this for someone that also looking for this stupid problem.
If you want to received ad on your device, DO NOT put your device ID in the adRequest.testDevices

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top