adMob无法在真实设备上运行(iPhone)
问题描述:
我使用iOS模拟器测试了adMob。它在屏幕底部显示广告。
,但是当我将其更改为真实设备时,广告不会展示。
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.
[GADMobileAds configureWithApplicationID:@"ca-app-pub-7067850045620785~8479598780"];
ViewController.m
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;
答
我发现一旦切换到带有非测试adUnitId的实时设备,大约需要30分钟才能建立可以加载的广告资源。
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.
我以前曾经经历过,并在这里找到答案: AdMob的帮助
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.