2013-03-28 141 views
1

我在iOS应用程序中测试AdMob广告。 AdMob广告似乎忽视了测试,标志我把代码:以测试模式从AdMob接收制作广告和插页式广告

-(IBAction)quitButtonHit:(id)sender{ 
    [[AudioPlayer sharedManager] stopSound]; 
    [self.timer invalidate]; 
    interstitial_ = [[GADInterstitial alloc] init]; 
    interstitial_.adUnitID = adMobUnitID; 
    interstitial_.delegate = self; 
    GADRequest *request = [GADRequest request]; 
    request.testing = YES; 
    [interstitial_ loadRequest:[GADRequest request]]; 
} 

-(void) interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error { 
    [self dismissViewControllerAnimated:YES completion:nil]; 
} 

-(void) interstitialDidDismissScreen:(GADInterstitial *)ad { 
    [self dismissViewControllerAnimated:YES completion:nil]; 
} 

-(void) interstitialDidReceiveAd:(GADInterstitial *)ad { 
    [ad presentFromRootViewController:self]; 
} 

我收到生产的插页式广告,当我在我的应用程序打退出键。我不明白为什么Google会声明他们会邀请您能够接收插页式广告,并且因为我在请求中设置了测试标志。

我也在我应用程序的AdMob横幅中收到制作广告。但那只适用于我的设备 - 在模拟器上显示测试广告。请求横幅时,我还设置了测试标志。

我希望制作广告能够消失,所以我不必担心不小心点击它们。

我使用AdMob的lates API(版本6.3.0)。我的部署目标是iOS 6.0。

任何人都可以解释这一点,也许建议一个解决方案,使生产广告消失?

谢谢!

回答

0

试试这个:

request.testDevices = 
     [NSArray arrayWithObjects: 
      // TODO: Add your device/simulator test identifiers here. They are 
      // printed to the console when the app is launched. 
      nil]; 

希望这会帮助你。

所有最好的!

+0

谢谢,这是我需要让制作广告走开:)但现在我没有收到任何插页式广告 - 既没有测试广告也没有制作广告。但我会深入探讨AdMobs文档 - 我明显错过了一些文档。 – jakobL 2013-03-28 12:59:59