Search code examples
swiftswift2adbannerview

AdBannerView unhandled error -- Error with iAds. The add comes up fine in the simulator, but give a strange warning?


Here's the error/ warning I get: 2016-01-20 13:21:58.375 TEst[11131:3816829] [AppDeveloper] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=7 "Ad was unloaded from this banner" UserInfo={ADInternalErrorCode=7, NSLocalizedFailureReason=Ad was unloaded from this banner, ADInternalErrorDomain=ADErrorDomain}

Here's what my code looks like: Code for ad banner

Am I missing something? ( I attached my iAd banner as an outlet and called it adBanner).


Solution

  • You need to add something like adBanner.delegate = self and implement the function didFailToReceiveAdWithError: