Xcode Swift Admob没有在模拟器上展示实时广告 [英] xcode swift admob not showing live ads on simulator
问题描述
我以前在Android应用上实现过AdMob,除非我指定
a测试广告,否则Android Simulator会显示实时广告。
I have implemented AdMob before on Android apps and unless I specified a test ad the Android Simulator would show up live ads.
@IBOutlet弱var bannerView:GADBannerView!
@IBOutlet weak var bannerView: GADBannerView!
//Display Ads
self.bannerView.adUnitID = "mypubid"
self.bannerView.rootViewController = self
var request: GADRequest = GADRequest()
self.bannerView.loadRequest(request)
我不使用任何.test设备GAD_SIMULATOR,因此它不应该显示
任何测试广告,但是我看到了应用负载就是这个测试标语:
http://i.stack.imgur .com / DXyPF.png
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
我设置了一个桥接标题和那个-ObjC变量。
我不知道为什么当我没有
指定任何测试设备时为什么会显示测试广告。
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.
我做错什么了吗?或者ios admob sdk与android的
不同,并且它不会在模拟器上显示实时广告。
Am I doing anything wrong? Or the ios admob sdk is different from android's and it doesnt display live ads on simulator.
谢谢。
推荐答案
iOS SDK的最新版本将始终在模拟器上显示测试广告。您无需手动添加测试设备,因为肯定会使用模拟器的人进行测试。
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.
这篇关于Xcode Swift Admob没有在模拟器上展示实时广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!