首页 > 解决方案 > 不遵守 Admob 上限

问题描述

我正在开展一个项目,其中实施了 Admob,上限设置为每 5 分钟每位用户不超过 1 次展示(对于我的测试)。

但是广告是垃圾邮件。

我已经按照这里的文档:

https://developers.google.com/admob/ios/interstitial

但不尊重上限。

之前的开发者在 interstitialDidReceiveAd 中实现了调用,文档强烈不推荐

- (void)interstitialDidReceiveAd:(GADInterstitial *)ad {
   NSLog(@"interstitialDidReceiveAd");
   if (self.interstitial.isReady) {
    [self.interstitial presentFromRootViewController:self];
   }
}

我试图做的是从我的 viewDidAppear 方法拨打电话,但现在我的广告从未显示

-(void)viewDidAppear:(BOOL)animated {
   [super viewDidAppear:YES];

   [newtopicsBtn.titleLabel setFont:PANTON_SEMIBOLD([UniversalMethod setFontsize:12])];
   [newtopicsBtn.titleLabel setTextColor:[UIColor whiteColor]];
   [newtopicsBtn.titleLabel setText:NSLocalizedString(@"home_newtopics_title", @"")]; 

   if(self.interstitial.isReady) {
   [self.interstitial presentFromRootViewController:self];
   }
 }

你们有没有遇到过这样的问题?

标签: iosobjective-cadmob

解决方案


推荐阅读