简体   繁体   English

iAd适用于模拟器,但不适用于设备

[英]iAd works on simulator but not on device

I am updating an app with iAd. 我正在使用iAd更新应用程序。 The current version has iAd, and everything works great. 当前版本有iAd,一切都很棒。 But the changes have been substantial enough that I want to test the ads again before I submit the update. 但是这些变化足够大,我想在提交更新之前再次测试广告。

When I test iAd on the simulator, I get the test advertisement with no problem. 当我在模拟器上测试iAd时,我得到的测试广告毫无问题。 When I try to test it on the device, all I get are calls to didFailToReceiveAdWithError. 当我尝试在设备上测试它时,我得到的是对didFailToReceiveAdWithError的调用。 The descriptions of the error are either: 错误的描述是:

"The operation couldn't be completed. Ad inventory unavailable." “操作无法完成。广告资源不可用。”

or: 要么:

"The operation couldn't be completed. Unknown error." “操作无法完成。未知错误。”

In light of this, how can I make sure the ads will work in the updated app? 鉴于此,如何确保广告在更新的应用中有效?

I dealt with the "Unknown error" message for close to 9 hours. 我处理了“未知错误”消息近9个小时。 For me, my iPod touch had reset itself to 1970. I accidentally let the battery drain and the time & date got set back. 对我来说,我的iPod touch已经重置为1970年。我不小心让电池耗尽,时间和日期都被取消了。 I never bothered to set it back because I don't use that often. 我从不打扰它,因为我不经常使用它。 Once I set the date to the current date, that and other things began to work correctly (in-app purchases were also screwed up). 一旦我将日期设置为当前日期,那个和其他东西就开始正常工作了(应用内购买也搞砸了)。

确保已设置ADBannerView委托。

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

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