xcode swift admob not showing live ads on simulator

烂漫一生 提交于 2019-12-11 03:12:51

问题


I have implemented AdMob before on Android apps and unless I specified a test ad the Android Simulator would show up live ads.

@IBOutlet weak var bannerView: GADBannerView!

//Display Ads
self.bannerView.adUnitID = "mypubid"
self.bannerView.rootViewController = self
var request: GADRequest = GADRequest()
self.bannerView.loadRequest(request)

I dont use any .test devices GAD_SIMULATOR, so it shouldnt display any test ads, but what I see after the app loads is this test banner:
http://i.stack.imgur.com/DXyPF.png

I have set up a Bridging Header and that -ObjC variable. I dont know why it is displaying test ads when I havent specified any test devices.

Am I doing anything wrong? Or the ios admob sdk is different from android's and it doesnt display live ads on simulator.

Thank you.


回答1:


The latest version of the iOS SDK will always show test ads on the simulator. You don't need to manually add a test device, since anyone using the simulator is guaranteed to be testing.



来源:https://stackoverflow.com/questions/28816630/xcode-swift-admob-not-showing-live-ads-on-simulator

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