Wirh SDK 4.2 and iOS5, it has created some confusion for me. In my new tabbar-based app, I have multiple view controllers. I have carefully checked and re-checked that all iAd delgate methods are present. In fact, I took help of iAdSuite example for this.
I left the app running on the simiulator for a while in a viewController that does not show any test ads. I saw the following message (multiple) logged on the console.
2011-10-30 18:45:07.534 StopAlert[29299:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=3 "The operation couldn’t be completed. Ad inventory unavailable" UserInfo=0x795d7d0 {ADInternalErrorCode=3, NSLocalizedFailureReason=Ad inventory unavailable}
I am bothered that it points out that "no delegate or delegate does nto implement..." - even though the .m file has these delegate methods. Here they are:
- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
[self layoutForCurrentOrientation:YES];
}
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
[self layoutForCurrentOrientation:YES];
}
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave {
return YES;
}
- (void)bannerViewActionDidFinish:(ADBannerView *)banner {
}
Am I missing something?? I set breakpoints in all 4 of them - and sure enough they are not being hit. The delegate for the banner IS set to "self" and the declaration in the .h file does have ADBannerViewDelegate also.
I am stumped. Can someone help me go past it?
Thanks in advance.