iAd on build SOMETIMES working
iAd on build SOMETIMES works. (Majority of the time though) although I dont want my app to be rejected. When it works, it works fine. No errors and no GDP (debugging errors.) But when it does not work, here is the GDP (debugging error):
[Session started at 2011-04-28 16:51:17 +0800.]
2011-04-28 16:51:21.943 Illuminator[35952: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=0x621b8d0 {ADInternalErrorCode=3, NSLocalizedFailureReason=Ad inventory unavailable}
2011-04-28 16:51:22.780 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x575b870 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:23.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5714f80 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:24.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x57584f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:25.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5744b00 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:26.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621c9d0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:27.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x570fe40 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:28.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621c9d0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:29.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621c9d0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:30.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5758530 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:31.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x575b870 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:32.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5744b00 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:33.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x57584f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:34.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5714f80 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:35.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x570fe40 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:36.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5758530 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:37.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62189f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:38.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62189f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:39.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x575b870 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:40.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62189f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:41.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5744b00 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:42.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x57584f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:43.780 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5714f80 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:44.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x570fe40 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:45.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62189f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:46.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62189f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:47.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Co开发者_Go百科de=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62189f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:48.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62189f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:49.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5758530 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:50.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x57584f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:51.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5744b00 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:52.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621da50 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:53.609 Illuminator[35952: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=0x5744b00 {ADInternalErrorCode=3, NSLocalizedFailureReason=Ad inventory unavailable}
2011-04-28 16:51:53.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x575b870 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:54.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x570fe40 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:55.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x57584f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:56.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5744b00 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:57.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x575b870 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:58.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5714f80 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:51:59.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621a000 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:00.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621a000 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:01.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621a000 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:02.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5717d90 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:03.779 Illuminator[35952:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x621a000 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
[Session started at 2011-04-28 16:52:05 +0800.]
2011-04-28 16:52:08.109 Illuminator[35977: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=0x57422e0 {ADInternalErrorCode=3, NSLocalizedFailureReason=Ad inventory unavailable}
2011-04-28 16:52:08.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5744ad0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:09.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5743ec0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:10.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5743ec0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:11.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62395f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:12.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5743ec0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:13.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5743ec0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:14.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x5743ec0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
2011-04-28 16:52:15.631 Illuminator[35977:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x62395f0 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
Here is all my coding:
.h:
#import <UIKit/UIKit.h>
#import <iAd/iAd.h>
@interface RootViewController : UIViewController <ADBannerViewDelegate> {
BOOL bannerIsVisible;
ADBannerView *banner;
}
-(IBAction)Press:(id)sender;
-(IBAction)Pink:(id)sender;
-(IBAction)Yellow:(id)sender;
-(IBAction)Red:(id)sender;
-(IBAction)Blue:(id)sender;
-(IBAction)Green:(id)sender;
-(IBAction)Orange:(id)sender;
@property (nonatomic, assign) BOOL bannerIsVisible;
@property (nonatomic, retain) IBOutlet ADBannerView *banner;
@end
(ignore the button actions)
.m:
@synthesize banner, bannerIsVisible;
-(void)bannerViewDidLoadAd:(ADBannerView *)aBanner {
if (!self.bannerIsVisible) {
[UIView beginAnimations:@"animateAdBannerOn" context:NULL];
// assumes the banner view is at the top of the screen.
banner.frame = CGRectOffset(banner.frame, 0.0, 50.0);
[UIView commitAnimations];
self.bannerIsVisible = YES;
}
}
-(void)bannerView: (ADBannerView *)aBanner didFailToReceiveAdWithError:(NSError *)error {
if (self.bannerIsVisible) {
[UIView beginAnimations:@"animateAdBannerOff" context:NULL];
// assumes the banner view is at the top of the screen.
banner.frame = CGRectOffset(banner.frame, 0.0, -320.0);
[UIView commitAnimations];
self.bannerIsVisible = NO;
}
}
There was another piece of code that talked about interface orientation but my ap does not support that so i removed it. Before that this error was still showing.
Thank you!
As Hugo proposed, configuring the [banner setDelegate:self]; solves the issue.
regards.
精彩评论