I am trying to show ads on app. But it is not working (on Simulator + devices). error deatils : Error: Unable to show ads. Error: The operation couldn’t be completed. Ad was unloaded from this banner
-(void)viewDidLoad {
[super viewDidLoad];
self.adBanner.delegate = self;
self.adBanner.alpha = 0.0;
}
-(void)bannerViewDidLoadAd:(ADBannerView *)banner {
[UIView animateWithDuration:0.5 animations:^ {
self.adBanner.alpha = 1.0;
}];
}
-(BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave {
NSLog(@"Ad Banner action is about to begin.");
self.pauseTimeCounting = YES;
return YES;
}
-(void)bannerViewActionDidFinish:(ADBannerView *)banner {
NSLog(@"Ad Banner action did finish");
self.pauseTimeCounting = NO;
}
-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
NSLog(@"Unable to show ads. Error: %@", [error localizedDescription]);
// Hide the ad banner.
[UIView animateWithDuration:0.5 animations:^ {
self.adBanner.alpha = 0.0;
}];
}