【问题标题】:Receiving production ads and interstitials from AdMob in test mode在测试模式下从 AdMob 接收制作广告和插页式广告
【发布时间】:2013-03-28 10:47:48
【问题描述】:

我正在我的 iOS 应用程序中测试 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 的最新 API(版本 6.3.0)。我的部署目标是 iOS 6.0。

任何人都可以解释这一点,并可能提出一个解决方案,使生产广告消失?

谢谢!

【问题讨论】:

    标签: ios admob interstitial


    【解决方案1】:

    试试这个:

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

    【讨论】:

    • 谢谢,我需要让生产广告消失 :) 但现在我根本没有收到任何插页式广告 - 测试广告和生产广告都没有。但我会更深入地研究 AdMobs 文档 - 我显然错过了一些文档。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-21
    • 1970-01-01
    • 1970-01-01
    • 2018-01-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多