IAd didFailToReceiveAdWithError always raised

I use iAd in the root view controller (map-based application), and every time I switch to the new view controller after clicking the annotation or button on the toolbar, didFailToReceiveAdWithError is didFailToReceiveAdWithError .

This is the “error” I get:

Domain error = Code ADErrorDomain = 0 "Operation could not be completed. Unknown error" UserInfo = 0x251ba2d0 {ADInternalErrorCode = 7, ADInternalErrorDomain = ADErrorDomain, NSLocalizedFailureReason = Unknown error}

This is normal? And if so, is there a way to disable this?

+4
source share
1 answer

If you go to the screen where the ad is not visible, it is recommended to disable it. Then you should not be able to get it. Remove it from the supervisor, set the delegate to zero and release it. Create it again when it is visible again.

This contradicts the way you usually do things in Cocoa to purify things on screens that you’re going away from, but how you should do it for iAd.

+3
source

Source: https://habr.com/ru/post/1484321/


All Articles