Swift Admob控制台显示模拟器设备ID,但在iPhone上运行时却没有?

时间:2017-04-20 01:17:46

标签: ios swift firebase admob

我已将Admob实施到我的项目中,但我无法为我的iPhone添加测试设备ID。

以下是代码:

let request = GADRequest()
myAd = GADInterstitial(adUnitID: "ca-app-pub-4411736350819540/1731977668")
myAd.delegate = self
myAd.load(request)

我在运行应用时未在控制台中显示我的设备ID,它只显示实际广告,而不是测试广告。

它在Simulator中工作正常,并告诉我如何添加模拟器ID。

这是在iPhone上运行时来自控制台的反馈

2017-04-20 01:57:57.311 SpaceShip[2798:] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-04-20 01:57:57.392 SpaceShip[2798:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled 
2017-04-20 01:57:57.398: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-04-20 01:57:57.397 SpaceShip[2798:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
true
2017-04-20 01:58:05.367 SpaceShip[2798:] <FIRAnalytics/INFO> Firebase Analytics enabled

1 个答案:

答案 0 :(得分:5)

请检查您的产品 - &gt;方案 - &gt;参数 - &gt;如果有密钥,则为环境变量:OS_ACTIVITY_MODE,禁用/删除密钥。

enter image description here