AdMob interstitial shown only once on iOS -
AdMob interstitial shown only once on iOS -
i'm using admob interstitial on ios app. i'm able display interstitial 1 time, farther request display new interstitial fails (delegate never called way).
my code follow:
-(void) viewdidload { [super viewdidload]; [self allocateanddisplayad]; } -(void) allocateanddisplayad { splashinterstitial_ = [[gadinterstitial alloc] init]; splashinterstitial_.adunitid = @"ca-app-pub-my-id"; splashinterstitial_.delegate = self; gadrequest *requestinterstitial = [gadrequest request]; [splashinterstitial_ loadrequest: requestinterstitial]; } // below functions delegate never triggered when requesting new interstitial !! - (void)interstitialdidreceivead:(gadinterstitial *)ad { [splashinterstitial_ presentfromrootviewcontroller: self]; } - (void)interstitial:(gadinterstitial *)ad didfailtoreceiveadwitherror:(gadrequesterror *)error { splashinterstitial_ = nil; } - (void)interstitialdiddismissscreen:(gadinterstitial *)ad { splashinterstitial_ = nil; }
the interstitial displayed when app launches (request done viewdidload), new request (call allocateanddisplayad) fails (no error message, delegate function never called).
i tried set splashinterstitial_ = nil; i'm sure next request reallocate new interstitial, no way display more 1 ad.
any help appreciated. thanks
ok found issue
any request show interstitial applicationwillenterforeground ignored ... , sec request done applicationwillenterforeground
ios admob interstitial
Comments
Post a Comment