adMob not working on real device (iPhone)

浪尽此生 提交于 2019-12-13 04:33:57

问题


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.



来源:https://stackoverflow.com/questions/48392112/admob-not-working-on-real-device-iphone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!