简体   繁体   English

iAd和didFailToReceiveAdWithError

[英]iAd and didFailToReceiveAdWithError

I'm getting a "didFailToReceiveAdWithError" message in the console while running in the simulator. 在模拟器中运行时,控制台中出现“ didFailToReceiveAdWithError”消息。 Is this the same method as the "didFailToReceiveAdWithError" method referred to in the message? 这与消息中引用的“ didFailToReceiveAdWithError”方法相同吗?

My view controller implements ADBannerViewDelegate protocol, and in particular the -(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error method. 我的视图控制器实现ADBannerViewDelegate协议,特别是-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error方法。 The Ad's delegate is set to the view controller. 广告的委托设置为视图控制器。

I haven't found any other methods resembling a "didFailToReceiveAdWithError" in the docs. 我还没有在文档中找到其他类似于“ didFailToReceiveAdWithError”的方法。

Yes. 是。 That message in the console is indeed corresponding to the iAd's delegate function. 控制台中的该消息确实与iAd的委托功能相对应。 It is normal to get this as the test iAd fill rate is not 100%. 由于测试iAd填充率不是100%,因此很正常。 When there are no ad to serve, this delegate (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error will be called by iOS. 当没有广告要投放时,iOS将调用此委托(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM