Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 605
Alexey Nakhimov Avatar asked Jan 28 '26 18:01

Alexey Nakhimov


1 Answers

This is a bug in current version of simulator

like image 136
Alexey Nakhimov Avatar answered Jan 31 '26 08:01

Alexey Nakhimov