Alexey Nakhimov
Alexey Nakhimov

Reputation: 2681

iAd (ADBannerView) work, but have strange system output in Swift

Tried to include advertising in the test application. Banner normally displayed, but the transition from the controller, in which there is advertising on the other controller, in the system output is displayed strange information:

[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}

UPDATED: When app start, in system output displayed this information:

<Error>: CGAffineTransformInvert: singular matrix.

But app still working fine........

My code in controller with 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
}

What is wrong?

Upvotes: 3

Views: 1557

Answers (1)

Alexey Nakhimov
Alexey Nakhimov

Reputation: 2681

This is a bug in current version of simulator

Upvotes: 4

Related Questions