Select platform: [Android](https://developers.google.com/admob/android/next-gen/interstitial "View this page for the Android platform documentation.") [iOS](https://developers.google.com/admob/ios/interstitial "View this page for the iOS platform documentation.") [Unity](https://developers.google.com/admob/unity/interstitial "View this page for the Unity platform documentation.") [Flutter](https://developers.google.com/admob/flutter/interstitial "View this page for the Flutter platform documentation.") [Android (Legacy)](https://developers.google.com/admob/android/interstitial "View this page for the Android (Legacy) platform documentation.")

<br />

Interstitial ads are full-screen ads that cover the interface of an app until
closed by the user. They're typically displayed at natural transition points in
the flow of an app, such as between activities or during the pause between
levels in a game. When an app shows an interstitial ad, the user has the choice
to either tap on the ad and continue to its destination or close it and return
to the app.

[Case study](https://admob.google.com/home/resources/freaking-math-powers-revenue-increase-with-google-admob-support/).


This guide shows you how to integrate interstitial ads into an iOS app.

## Prerequisites

Before you continue, [set up Google Mobile Ads SDK](https://developers.google.com/admob/ios/quick-start).

## Always test with test ads

When building and testing your apps, make sure you use test ads rather than
live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID
for iOS interstitials:  

`ca-app-pub-3940256099942544/4411468910`

It's been specially configured to return test ads for every request, and you're
free to use it in your own apps while coding, testing, and debugging. Just make
sure you replace it with your own ad unit ID before publishing your app.

For details on Google Mobile Ads SDK test ads, see
[Enable test ads](https://developers.google.com/admob/ios/test-ads).

## Implementation

The main steps to integrate interstitial ads are:

1. Load an ad.
2. Register for callbacks.
3. Display the ad.

### Load an ad

Loading an ad is accomplished using the
[`load(adUnitID:request)`](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Classes/GADInterstitialAd#+loadwithadunitid:request:completionhandler:) method on the
`GADInterstitialAd` class.

### Swift

    fileprivate func loadInterstitial() async {
      do {
        interstitial = try await InterstitialAd.load(
          with: "ca-app-pub-3940256099942544/4411468910", request: Request())
        interstitial?.fullScreenContentDelegate = self
      } catch {
        print("Failed to load interstitial ad with error: \(error.localizedDescription)")
      }
    }

### SwiftUI

    import GoogleMobileAds

    class InterstitialViewModel: NSObject, FullScreenContentDelegate {
      private var interstitialAd: InterstitialAd?

      func loadAd() async {
        do {
          interstitialAd = try await InterstitialAd.load(
            with: "ca-app-pub-3940256099942544/4411468910", request: Request())
          interstitialAd?.fullScreenContentDelegate = self
        } catch {
          print("Failed to load interstitial ad with error: \(error.localizedDescription)")
        }
      }

### Objective-C

    [GADInterstitialAd
         loadWithAdUnitID:@"ca-app-pub-3940256099942544/4411468910"
                  request:[GADRequest request]
        completionHandler:^(GADInterstitialAd *ad, NSError *error) {
          if (error) {
            NSLog(@"Failed to load interstitial ad with error: %@", [error localizedDescription]);
            return;
          }
          self.interstitial = ad;
          self.interstitial.fullScreenContentDelegate = self;
        }];


> [!TIP]
> **Tip:** You can use ad load calls to build up a cache of preloaded ads before you intend to show them, so that ads can be shown with zero latency when needed. Because ads expire after an hour, you should clear this cache and reload with new ads every hour.

<br />

### Register for callbacks

In order to receive notifications for presentation events, you must assign the
`GADFullScreenContentDelegate` to the `fullScreenContentDelegate` property of
the returned ad:

### Swift

    interstitial?.fullScreenContentDelegate = self

### SwiftUI

    interstitialAd?.fullScreenContentDelegate = self

### Objective-C

    self.interstitial.fullScreenContentDelegate = self;

The `GADFullScreenContentDelegate` protocol handles callbacks for when the ad
presents successfully or unsuccessfully, and when it is dismissed. The following
code shows how to implement the protocol:

### Swift

    func adDidRecordImpression(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func adDidRecordClick(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func ad(_ ad: FullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) {
      print("\(#function) called with error: \(error.localizedDescription)")
      // Clear the interstitial ad.
      interstitial = nil
    }

    func adWillPresentFullScreenContent(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func adWillDismissFullScreenContent(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func adDidDismissFullScreenContent(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
      // Clear the interstitial ad.
      interstitial = nil
    }

### SwiftUI

    func adDidRecordImpression(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func adDidRecordClick(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func ad(
      _ ad: FullScreenPresentingAd,
      didFailToPresentFullScreenContentWithError error: Error
    ) {
      print("\(#function) called")
    }

    func adWillPresentFullScreenContent(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func adWillDismissFullScreenContent(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
    }

    func adDidDismissFullScreenContent(_ ad: FullScreenPresentingAd) {
      print("\(#function) called")
      // Clear the interstitial ad.
      interstitialAd = nil
    }

### Objective-C

    - (void)adDidRecordImpression:(id<GADFullScreenPresentingAd>)ad {
      NSLog(@"%s called", __PRETTY_FUNCTION__);
    }

    - (void)adDidRecordClick:(id<GADFullScreenPresentingAd>)ad {
      NSLog(@"%s called", __PRETTY_FUNCTION__);
    }

    - (void)ad:(id<GADFullScreenPresentingAd>)ad
        didFailToPresentFullScreenContentWithError:(NSError *)error {
      NSLog(@"%s called with error: %@", __PRETTY_FUNCTION__, error.localizedDescription);
      // Clear the interstitial ad.
      self.interstitial = nil;
    }

    - (void)adWillPresentFullScreenContent:(id<GADFullScreenPresentingAd>)ad {
      NSLog(@"%s called", __PRETTY_FUNCTION__);
    }

    - (void)adWillDismissFullScreenContent:(id<GADFullScreenPresentingAd>)ad {
      NSLog(@"%s called", __PRETTY_FUNCTION__);
    }

    - (void)adDidDismissFullScreenContent:(id<GADFullScreenPresentingAd>)ad {
      NSLog(@"%s called", __PRETTY_FUNCTION__);
      // Clear the interstitial ad.
      self.interstitial = nil;
    }

`GADInterstitialAd` is a one-time-use object. This
means that once an interstitial ad is shown, it cannot be shown again. A best
practice is to load another interstitial ad in the
`adDidDismissFullScreenContent:` method on `GADFullScreenContentDelegate` so
that the next interstitial ad starts loading as soon as the previous one is
dismissed.

### Display the ad

Interstitials should be displayed during natural pauses in the flow of an app.
Between levels of a game is a good example, or after the user completes a task.

### Swift

    ad.present(from: self!)

### SwiftUI

Listen to UI events in the view to determine when to show the ad.

    var body: some View {
      // ...
      }
      .onChange(of: countdownTimer.isComplete) { newValue in
        showGameOverAlert = newValue
      }
      .alert(isPresented: $showGameOverAlert) {
        Alert(
          title: Text("Game Over"),
          message: Text("You lasted \(countdownTimer.countdownTime) seconds"),
          dismissButton: .cancel(
            Text("OK"),
            action: {
              viewModel.showAd()
            }))

Present the interstitial ad from the view model:

    func showAd() {
      guard let interstitialAd = interstitialAd else {
        return print("Ad wasn't ready.")
      }

      interstitialAd.present(from: nil)
    }

### Objective-C

    [self.interstitial presentFromRootViewController:self];

## Best practices

Consider whether interstitial ads are the right type of ad for your app.
:   Interstitial ads work best in apps with natural transition points.
    The conclusion of a task within an app, like sharing an image or completing a
    game level, creates such a point. Because the user is expecting a break in the
    action, it's easy to present an interstitial ad without disrupting their
    experience. Make sure you consider at which points in your app's workflow you'll
    display interstitial ads and how the user is likely to respond.

Remember to pause the action when displaying an interstitial ad.
:   There are a number of different types of interstitial ads: text, image,
    video, and more. It's important to make sure that when your app displays an
    interstitial ad, it also suspends its use of some resources to allow the ad to
    take advantage of them. For example, when you make the call to display an
    interstitial ad, be sure to pause any audio output being produced by your app.
    You can resume playing sounds in the
    [`adDidDismissFullScreenContent:`](https://developers.google.com/admob/ios/api/reference/Protocols/GADFullScreenContentDelegate#-adDidDismissFullScreenContent:)
    event handler, which will be invoked when the user has finished interacting
    with the ad. In addition, consider temporarily halting any intense computation
    tasks (such as a game loop) while the ad is being displayed. This will ensure
    that the user doesn't experience slow or unresponsive graphics or stuttered
    video.

Allow for adequate loading time.
:   Just as it's important to make sure you display interstitial ads at an
    appropriate time, it's also important to make sure the user doesn't have to
    wait for them to load. Loading the ad in advance before you intend to show
    can ensure that your app has a fully loaded interstitial ad at the ready when
    the time comes to display one.

Don't flood the user with ads.
:   While increasing the frequency of interstitial ads in your app might seem
    like a great way to increase revenue, it can also degrade the user experience
    and lower clickthrough rates. Make sure that users aren't so frequently
    interrupted that they're no longer able to enjoy the use of your app.

Don't use the load completion callback to show the interstitial.
:   This can cause a poor user experience. Instead, pre-load the ad before you
    need to show it. Then check the `canPresentFromRootViewController:error:` method
    on `GADInterstitialAd` to find out if it is ready to be
    shown.

## Additional resources

### Examples on GitHub

View the full interstitial ads examples in your preferred language:

- [Swift](https://github.com/googleads/googleads-mobile-ios-examples/tree/main/Swift/admob/InterstitialExample)
- [SwiftUI](https://github.com/googleads/googleads-mobile-ios-examples/tree/main/Swift/advanced/SwiftUIDemo/SwiftUIDemo/Interstitial)
- [Objective-C](https://github.com/googleads/googleads-mobile-ios-examples/tree/main/Objective-C/admob/InterstitialExample)

### Mobile Ads Garage video tutorials

- [Interstitial best practices](https://www.youtube.com/watch?v=r2RgFD3Apyo&index=5&list=PLOU2XLYxmsIKX0pUJV3uqp6N3NeHwHh0c)

### Success stories

- [Sample use case](https://admob.google.com/home/resources/freaking-math-powers-revenue-increase-with-google-admob-support/)

## Next steps

- If you haven't already, create your own interstitial ad unit in the [AdMob UI](https://apps.admob.com).
- Learn more about [ad targeting](https://developers.google.com/admob/ios/targeting) and [interstitial ad guidelines](https://support.google.com/admob/answer/6066980).
- Learn more about [user privacy](https://developers.google.com/admob/ios/privacy).