adMob not working on real device (iPhone)

2019-08-18 05:09发布

问题:

I tested adMob with iOS simulator. It shows ads at the bottom of the screen. But when I change it to real device the ads not showing.

enter image description here

AppDelegate.m

[GADMobileAds configureWithApplicationID:@"ca-app-pub-7067850045620785~8479598780"];

ViewController.m

self.bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait];

self.bannerView.adUnitID = @"ca-app-pub-7067850045620785/6404933932";
self.bannerView.rootViewController = self;
[self.bannerView loadRequest:[GADRequest request]];
self.bannerView.delegate = self;

回答1:

I've found that once you've switched to a live device with a non-test adUnitId it can take roughly 30 minutes to build the inventory up to load.

I've experienced this before and found my answer here: AdMob's Help

If the test ad is working, give it some time.

And, obviously, make sure you have access to the internet.



标签: ios admob