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

admob, ads, interstitial, ios

Solution

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

Problem

Is this code correct to implement an interstitial ad? Because when I launch it I get this, ``` <Google> Cannot present interstitial. It is not ready. ```

Original source