iAd error “Ad inventory unavailable”

I’m adding iAd to my app. Now, in simulator, it works well but when I load it on a device (v4.1) the ADBannerViewDelegate calls bannerView:didFailToReceiveAdWithError: with this description on the error.userInfo

{
    ADInternalErrorCode = 3;
    NSLocalizedFailureReason = "Ad inventory unavailable";
}

I think my iAd Network setup is correct. Have I to add an ad by myself or iAd Network automatically sends test ads as in simulator?

  • Use Bundle Identifier instead of Product Bundle Identifier with Xcode 7
  • Changing an Int to a CGFloat in Swift to return heightForRowAtIndexPath tableview function
  • Swift iOS: how to trigger next page using buttons
  • How to convert a double into a byte array in swift?
  • iOS Static Library as a Subproject of a Project That Has Custom Build Configurations?
  • dynamic uitableview cell height
  • EDIT: I think it was a latency problem of the iAd Network server that dispatches the ads. I suppose that when the network had ads for my app it began to work fine.

    7 Solutions Collect From Internet About “iAd error “Ad inventory unavailable””

    if you running with a development certificate you will only get test ads even when running on a device. From the iAd Programming Guide:

    While you are developing your
    application, iAd Network sends test
    advertisements to your application. To
    assist you in validating your
    implementation, the iAd Network
    occasionally returns errors to test
    your error handling code. You can also
    test your error handling support by
    turning your device’s wireless
    capability off.

    So you should see the test Ad on the device but you will never see a real live ad.

    Yes, Removing app from device and rebuilding solved it in my case.

    It was a latency problem of the iAd Network server that dispatches the ads. I suppose that when the network had ads for my app it began to work fine.

    After this did not work for me, deleting the app from the device and doing a clean build did.

    Just an additional update, running ad testing on my IPAD I got this error suddently, after banging my head (as others have done) for a while I noticed the time on the IPAD was 8 mins out, both were set on auto but still 8 mins difference, set the IPAD clock manually and error went away!.

    Hope this helps someone.

    According to the ADBannerView class reference of Apple’s documantation iOS Developer Library:

    enum {
    ADErrorUnknown = 0,
    ADErrorServerFailure = 1,
    ADErrorLoadingThrottled = 2,
    ADErrorInventoryUnavailable = 3,
    ADErrorConfigurationError = 4,
    ADErrorBannerVisibleWithoutContent = 5,
    ADErrorApplicationInactive = 6
    };
    typedef NSUInteger ADError;
    
    //ADErrorInventoryUnavailable
    //Indicates that no advertisements are currently available to download.
    //Available in iOS 4.0 and later.
    //Declared in ADBannerView.h.
    

    Therefore it is an exception caused by the server side of the iAd; not the code itself.

    For the last 5 days I’ve been having the same issue. I was getting a valid response before that and the bannerViewDidLoadAd delegate method was been called. Maybe there is something on apple’s side? I didn’t find anything that implies that, but it’s my guess