Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios AdMob-测试与发布_Ios_Admob_Ios Simulator - Fatal编程技术网

Ios AdMob-测试与发布

Ios AdMob-测试与发布,ios,admob,ios-simulator,Ios,Admob,Ios Simulator,因此,我的应用程序中有Google的AdMob,我想知道在模拟器或设备上测试时用于显示测试添加的几行代码 这是我使用的代码(如所示): 我的问题是,您是否将代码保留在检查您是否在自己的设备上?这一行: //Requests test ads on devices you specify. Your test device ID is printed to //the console when an ad request is made. GADBannerView automatically r

因此,我的应用程序中有Google的AdMob,我想知道在模拟器或设备上测试时用于显示测试添加的几行代码

这是我使用的代码(如所示):

我的问题是,您是否将代码保留在检查您是否在自己的设备上?这一行:

//Requests test ads on devices you specify. Your test device ID is printed to
//the console when an ad request is made. GADBannerView automatically returns
//test ads when running on a simulator.
request.testDevices = @[@"2077ef9a63d2b398840261c8221a0c9a"];// Eric's iPod Touch
因为我最近注意到,当我从应用商店下载我自己的应用程序时,它仍然显示测试广告,这可能就是为什么。。。?我只是在开发第二个应用程序时才想到这一点

多谢各位

我的问题是,您是否将代码保留在检查您是否在自己的设备上


如果您在分布式应用程序中退出
request.testDevices=@[@“testID”]
,测试广告将显示给用户。在向应用商店提交应用程序之前,您需要删除或注释掉这一行

它是用于测试的,不应该出现在生产代码中。嗯,我不确定,它会一直只为阵列中的那些设备显示测试广告相信我,我只是犯了同样的错误(
//Requests test ads on devices you specify. Your test device ID is printed to
//the console when an ad request is made. GADBannerView automatically returns
//test ads when running on a simulator.
request.testDevices = @[@"2077ef9a63d2b398840261c8221a0c9a"];// Eric's iPod Touch