xcode swift admob not showing live ads on simulato

2019-07-20 03:04发布

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条回答
Luminary・发光体
2楼-- · 2019-07-20 03:12

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.

查看更多
登录 后发表回答