ios - GADInterstitialAd not presenting in AppDelegate -


question:(ios)
want display gadinterstitialad @ applicationdidbecomeactive in appdelegate. bellow code i'm using

- (void)showinterstitial{     gadrequest *request = [gadrequest request]; // here need crate object of gadrequest     request.testdevices = @[ kgadsimulatorid ];     gadinterstitial* interstitialad = [[gadinterstitial alloc]initwithadunitid:advertismentid];     interstitialad.delegate = self;     [interstitialad loadrequest:request]; } - (void)interstitialdidreceivead:(gadinterstitial *)interstitial {     [interstitial presentfromrootviewcontroller:pagerviewcontroller]; } - (void)interstitial:(gadinterstitial *)interstitial didfailtoreceiveadwitherror:(gadrequesterror *)error {     // [[uiapplication sharedapplication] setstatusbarhidden:false withanimation:no];     nslog(@"==%@",[error localizeddescription]); }  -(void)interstitialwillpresentscreen:(gadinterstitial *)ad{     // [[uiapplication sharedapplication] setstatusbarhidden:true withanimation:no];     nslog(@"on screen"); } 

and i'm calling [self showinterstitial] in applicationdidbecomeactive
i've added <gadinterstitialdelegate> delegate methods not calling i'm not getting errors. please me.

ok, got answer.
used strong reference of gadinterstitialad in above code.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -