Admob interstitial ads - Cannot present interstitial. It is not ready

user3530648 picture user3530648 · Apr 16, 2014 · Viewed 11.5k times · Source

Is this code correct to implement an interstitial ad?

enter image description here

Because when I launch it I get this,

<Google> Cannot present interstitial.  It is not ready.

Answer

Rahul Patel picture Rahul Patel · Apr 16, 2014

You need to wait until the ad loads successfully and only then present it in case of Interstitial ads. Otherwise the ads wont show up.

To do this conform to the GADInterstitialDelegate protocol and set your view controller as the delegate of interstitial_.

interstitial_.delegate = self;

Then implement interstitialDidReceiveAd as follows.

- (void)interstitialDidReceiveAd:(GADInterstitial *)ad
{
    [interstitial_ presentFromRootViewController:self];
}

For more reference, please check Interstitials ads