iOS9 self.canDisplayBannerAds = true is not showing any ads [closed]

大城市里の小女人 提交于 2019-12-03 05:09:36

问题


Very simple iAd code:

import UIKit
import iAd

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        self.canDisplayBannerAds = true
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}

iAd.framework is loaded.

It used to work. After iOS9, not working. Simulator settings for iAd set to 100% with refresh rate 15secs. Not showing any ads. Tried on actual iPhone 6, 5S, 4S and iPad Air2. Not showing any ads. Am I missing something here? About to lose my mind... All my apps that used to show iAds with no issues are now showing no iAds at all.


回答1:


This is no longer an issue. self.canDisplayBannerAds = true works as expected on devices and simulators running iOS 9 or later.



来源:https://stackoverflow.com/questions/32635714/ios9-self-candisplaybannerads-true-is-not-showing-any-ads

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