objective c - iOS - ADBannerView not showing ads on app -


i trying show ads on app. not working (on simulator + devices). error deatils : error: unable show ads. error: operation couldn’t completed. ad unloaded 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 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 show ads. error: %@", [error localizeddescription]); // hide ad banner. [uiview animatewithduration:0.5 animations:^ {     self.adbanner.alpha = 0.0; }]; 

}

the adbanner unloaded view when there no ads show.

go iad dashboard, follow instruction , enable ads app. (if have not got developer role in apple member center contact developer set ads app.)

your last delegate method

-(void)bannerview:(adbannerview *)banner didfailtoreceiveadwitherror:(nserror *)error 

gets called because not find ads.

note - test on devices ads not on simulator.


Comments