iOS9 self.canDisplayBannerAds = true is not showin

2019-03-09 02:19发布

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条回答
手持菜刀,她持情操
2楼-- · 2019-03-09 03:08

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

查看更多
登录 后发表回答