Reputation: 1292
I tried to include an ADBannerView into my application. But the ADBannerView always ends up in bannerView:didFailToReceiveAdWithError:. I'm not able to see any test ad.
I've also downloaded the iAd Sample Code from Apples DevCenter but I end up with the same error.
11/5/10 5:46:33 PM BasicAdBanner[12072] { ADInternalErrorCode = 3; NSLocalizedFailureReason = "Ad inventory unavailable"; }
Can someone please explain to me how I can get iAd to work in the Simulator and on my testing device?
Upvotes: 16
Views: 10469
Reputation: 15991
I was testing out the iAdInterstialSuite sample project from Apple's developer site and I encountered this same error message on my iPhone 6 Plus.
I discovered how to fix it in this instance though. Apparently since that sample project hasn't been updated for the iPhone 6 / 6 Plus screen sizes, it fails because of the subsequent screen scaling the device is doing to the app. (I'm guessing the ad server knows the type of device is requesting the ad, and thus would expect the target view dimensions to be a very specific size.)
When I set a launch screen XIB for the project, so the app was then rendered at the proper scale on the screen, the test ads started working straight away. :)
Upvotes: 0
Reputation: 2039
No, I believe it was generated by Apple's server so that developers can make correction for the error. Here is the reference from Apple.
Upvotes: 5
Reputation: 11
I had this problem too - an iPad would serve test iAds fine, but an iPhone would not. After a bit of investigation it seems to be related to the clock settings on the device, which sounds implausible I know! The automatic time on the iPhone was a few minutes slow, and the iPad a few minutes fast, as compared with the real time (as determined from the automatic time setting on the Mac).
Manually setting the time on the iPhone caused test iAds to start working - but only if the clock was correct to within a few seconds. So make sure to scroll the minutes wheel and exit the time picker just as the true time ticks over to the next minute. Actually it seems that it could be out by a few minutes as long as the seconds were about right, which is probably why the iPad worked ok despite being 5 minutes fast.
As to why the automatic time setting on the iPhone and iPad are so far out from the real time, that's another problem to solve. For now I'll leave my iPhone on manual time setting, at least while testing iAds.
Upvotes: 1
Reputation: 134
Same here, using sdk 4.1 and unable to launch any iAd test app for the past couple of days. I tried many things but nothing worked. Guess it's wrong on Apple side this time.
Upvotes: 2
Reputation: 11505
This happened to me once - and then another time - it all worked properly. My app is released now, and works fine. So in short - maybe it a transient problem on Apple's side - or a local network problem on yours. Try again - see if it ever works. BTW - at one point I was able to get the sample iAd on my simulator but nothing on the iPhone - I released it anyway and never hand an issue.
Upvotes: 0