Tuesday, 27 August 2013

Banner view ads not fetching from apple

Banner view ads not fetching from apple

I followed this tutorial but the ads do not show the way it does in most
apps.
Here is the code for handling the ads
-(void) bannerViewDidLoadAd:(ADBannerView *)banner {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[banner setAlpha:1.0];
[UIView commitAnimations];
NSLog(@"view did load");
}
-(void) bannerView:(ADBannerView *)banner
didFailToReceiveAdWithError:(NSError *)error {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[banner setAlpha:0.0];
[UIView commitAnimations];
NSLog(@"failed to receive ad");
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
When I run it I get the following output:
2013-08-27 15:03:45.154 The Ultimate DateABase[8642:c07] failed to receive ad
2013-08-27 15:03:45.157 The Ultimate DateABase[8642:c07] Error: Error
Domain=ADErrorDomain Code=3 "The operation couldn't be completed. Ad
inventory unavailable" UserInfo=0x7171d00 {ADInternalErrorCode=3,
ADInternalErrorDomain=ADErrorDomain, NSLocalizedFailureReason=Ad inventory
unavailable} {
ADInternalErrorCode = 3;
ADInternalErrorDomain = ADErrorDomain;
NSLocalizedFailureReason = "Ad inventory unavailable";
}
2013-08-27 15:03:45.157 The Ultimate DateABase[8642:c07] failed to receive ad
2013-08-27 15:03:45.158 The Ultimate DateABase[8642:c07] Error: Error
Domain=ADErrorDomain Code=0 "The operation couldn't be completed. Unknown
error" UserInfo=0x756ef00 {ADInternalErrorCode=0,
ADInternalErrorDomain=ADErrorDomain, NSLocalizedFailureReason=Unknown
error} {
ADInternalErrorCode = 0;
ADInternalErrorDomain = ADErrorDomain;
NSLocalizedFailureReason = "Unknown error";
}
2013-08-27 15:03:45.691 The Ultimate DateABase[8642:c07] failed to receive ad
2013-08-27 15:03:45.692 The Ultimate DateABase[8642:c07] Error: Error
Domain=ADErrorDomain Code=5 "The operation couldn't be completed. Banner
view is visible but does not have content" UserInfo=0x7192300
{ADInternalErrorCode=5, ADInternalErrorDomain=ADErrorDomain,
NSLocalizedFailureReason=Banner view is visible but does not have content}
{
ADInternalErrorCode = 5;
ADInternalErrorDomain = ADErrorDomain;
NSLocalizedFailureReason = "Banner view is visible but does not have
content";
}

No comments:

Post a Comment