How to load interstitial ads more than once?

1,192 views
Skip to first unread message

kirby10023

unread,
Sep 16, 2014, 7:51:58 PM9/16/14
to google-adm...@googlegroups.com
Is there a way to load an interstitial ad more than once on IOS? I get an error reading "Request Error: Will not send request because interstitial object has been used" after I try to request an interstitial ad after the first time I use it. I read on the google documentation that interstitial are a one time use object and that you need to allocate a new interstitial object. However, I've seen multiple apps use adMob interstitials and are able to display an interstitial ad more than once. So does anyone know a way to workaround the limit of being able to only load one interstitial ad? 

Any help would be greatly appreciated! 
Thank you!

Eric Leichtenschlag

unread,
Sep 17, 2014, 9:08:05 PM9/17/14
to google-adm...@googlegroups.com
Hello,

This error means that you'll need to do self.interstitial = [[GADInterstitial alloc] init]; every time before you do [self.interstitial loadRequest:request]. A good practice would be to create a helper method for initializing the interstitial like this:

- (void)createAndLoadInterstitial {
  self.interstitial = [[GADInterstitial alloc] init];
  self.interstitial.adUnitID = @"replace_with_your_ad_unit_id";
  GADRequest *request = [GADRequest request];
  // Request test ads on devices you specify. Your test device ID is printed to the console when
  // an ad request is made.
  request.testDevices = @[ GAD_SIMULATOR_ID, @"MY_TEST_DEVICE_ID" ];
  [self.interstitial loadRequest:request];
}

Every time you want to load a new interstitial, simply call your helper method.

Cheers,
Eric
Reply all
Reply to author
Forward
0 new messages