问题
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