iOS 9 - Ad inventory unavailable

后端 未结 2 1732
别跟我提以往
别跟我提以往 2021-01-18 17:57

After updating to Xcode 7 and building my app in iOS9, iAds stopped working and I get this error in bannerView

didFailToReceiveAdWithError:<

2条回答
  •  花落未央
    2021-01-18 18:33

    You may have set an invalid (height) constraint for the ADBannerView. Please check the constraints for it.

    In my case I had a wrong height constraint set in the storyboard scene. The height was set to 32 which is an invalid height for iPhone portrait mode. When I removed the bad constraint, the error ("Ad inventory unavailable") disappeared and the ads were delivered as before.

    Likely the issue may appear as ads working on one device and not on another. (see iAd error: Ad Inventory unavailable) I assume that the constraints match valid ad dimensions on one device but do not match the valid dimensions on the other device and then ads only work on one device and not on the other.

提交回复
热议问题