iAd(ADBannerView)工作,但在Swift中有奇怪的系统输出

时间:2014-07-21 05:38:23

标签: swift iad ios8 adbannerview

试图在测试应用程序中包含广告。横幅通常显示,但是从控制器转换,其中在另一个控制器上有广告,在系统输出中显示奇怪的信息:

[AppDeveloper] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=7 "The operation couldn’t be completed. Ad was unloaded from this banner" UserInfo=0x7cd27d80 {ADInternalErrorCode=7, ADInternalErrorDomain=ADErrorDomain, NSLocalizedFailureReason=Ad was unloaded from this banner}

更新:当app启动时,在系统输出中显示以下信息:

<Error>: CGAffineTransformInvert: singular matrix.

但应用程序仍然正常工作........

我在iAd控制器中的代码:

@IBOutlet var adBannerCurrentCity: ADBannerView

override func viewDidLoad() {
    super.viewDidLoad()
    self.canDisplayBannerAds = true
    self.adBannerCurrentCity.delegate = self
    self.adBannerCurrentCity.hidden = true
}

func bannerViewDidLoadAd(banner: ADBannerView!) {
    self.adBannerCurrentCity.hidden = false
}

func bannerViewActionShouldBegin(banner: ADBannerView!, willLeaveApplication willLeave: Bool) -> Bool {
    return willLeave
}

func bannerView(banner: ADBannerView!, didFailToReceiveAdWithError error: NSError!) {
    self.adBannerCurrentCity.hidden = true
}

有什么问题?

1 个答案:

答案 0 :(得分:4)

这是当前版本的模拟器

中的错误