16

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?

kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
Thomas Huber
  • 1,282
  • 1
  • 13
  • 23
  • 1
    Have you enabled iAds for your app via iTunes connect? – Jasarien Nov 06 '10 at 17:51
  • 2
    iAd is enabled via iTunes connect. But as I've posted I can't even see the test advertisement. Apples Sample code isn't even working ... – Thomas Huber Nov 06 '10 at 18:45
  • Are you using the iOS 4.2 GM sdk? Since I installed it, I have been getting that error as well for ALL my apps with iads both in the sim and on the devices. I'm thinking it must be something wrong on the iAd's back end. It would be nice for Apple to notify the devs, saving us all a lot of time and frustration. Can anyone else verify this using the 4.2 GM sdk? – W Dyson Nov 06 '10 at 19:10
  • This may be something to do with the iAd framework back end as they get ready to launch 4.2. My best guess is they have disabled test ads as they ass live ad support for iPad 4.2. – W Dyson Nov 06 '10 at 20:44
  • this happens for me too, on 4.1 i was seeing ads every time I ran the app in the simulator, since upgrading to 4.2 I'm getting the inventory unavailable error – seanalltogether Nov 25 '10 at 05:04
  • The issue appears to be resolved. For me at least. Test ads appeared to pushed properly as of 5 days after the 4.2 GM was seeded. – W Dyson Nov 25 '10 at 22:14
  • Just wait - it depends on Apple's test ad servers and sometimes it takes a minute or two for the test ad to appear. – SarahR Sep 05 '12 at 00:52
  • http://stackoverflow.com/questions/17704253/adbannerview-fails-to-receive-ad-with-error-the-operation-couldnt-be-completed/22990407#22990407 It worked fine to me. – Lennon Spirlandelli Apr 10 '14 at 14:11
  • [As of December 31, 2016, the iAd App Network is no longer available.](https://developer.apple.com/support/iad/) – Cœur Jul 02 '17 at 08:17

5 Answers5

5

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.enter image description here

Pang
  • 9,564
  • 146
  • 81
  • 122
Yoon Lee
  • 2,029
  • 22
  • 27
2

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.

  • I've created a thread within Apples developer forum. But I haven't got any helping response so far. – Thomas Huber Nov 08 '10 at 04:26
  • I'm having the same issue with iOS 4.1 SDK and with Apple's BasicAdBanner sample code. Adding an NSLog shows errors like: 2010-11-08 14:08:02.026 BasicAdBanner[20460:207] didFailToReceiveAdWithError: error=Error Domain=ADErrorDomain Code=3 "The operation couldn’t be completed. Ad inventory unavailable" UserInfo=0x6e24e30 {ADInternalErrorCode=3, NSLocalizedFailureReason=Ad inventory unavailable} – Rei Nov 08 '10 at 22:08
  • I reported this to bugreport.apple.com. Let's see if they respond. – Rei Nov 08 '10 at 22:08
1

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.

Jon Grove
  • 11
  • 1
  • Actually, this resolved my problem of not getting iAds on my 3GS running iOS4.2. Thanks, Jon. – Sam Nov 20 '11 at 10:23
0

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. :)

TiM
  • 15,812
  • 4
  • 51
  • 79
  • hmm, i have a launch screen set for the app ... plus i tried running it in the iPhone 5S simulator, and i still get the same error. – john.k.doe Sep 03 '16 at 23:44
  • 1
    Aww, considering Apple have now fully retired iAd, it's probably not worth the effort looking into this anymore. :( – TiM Sep 05 '16 at 04:02
  • so it has! https://developer.apple.com/support/iad/ … that tells you how long since i have bothered to update the one app that i have that uses iAd . thanks, @T – john.k.doe Sep 11 '16 at 09:35
0

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.

Brad
  • 11,262
  • 8
  • 55
  • 74
  • I'm thinking maybe it's a problem on Apples side? Since Apples provided sample code for iAd isn't working too. Maybe you can try to run the sample code at your mac and tell me if it's showing the test ad. – Thomas Huber Nov 06 '10 at 19:25