iOS 9 - Ad inventory unavailable

爷,独闯天下 提交于 2019-12-01 17:43:36

问题


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

didFailToReceiveAdWithError:

Ad inventory unavailable.

Any ideas?

EDIT: iAds are now working. Apple must have fixed it after we filed bug reports on the issue.


回答1:


I am using Xcode 7.3.1 and I received the same error. After I renewed my membership I was able to click at the contracts,tax and banking information section. I saw that there wasn't a contract type for the iAd App Network anymore..only a contract type for paid applications. So my suggestion is that Apple does not support iAd anymore. In that case I would recommend to have a look on AdMob(Google Advertising).

Best regards, Nazar Medeiros




回答2:


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.



来源:https://stackoverflow.com/questions/32658020/ios-9-ad-inventory-unavailable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!