iAd works on simulator but not on device

自作多情 提交于 2019-12-31 01:56:11

问题


I am updating an app with iAd. The current version has iAd, and everything works great. 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. When I try to test it on the device, all I get are calls to 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?


回答1:


I dealt with the "Unknown error" message for close to 9 hours. For me, my iPod touch had reset itself to 1970. I accidentally let the battery drain and the time & date got set back. 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).




回答2:


Make sure you have set the ADBannerView delegate.



来源:https://stackoverflow.com/questions/3898902/iad-works-on-simulator-but-not-on-device

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!