Interstitial Ads

Interstitial ads provide full-screen experiences, commonly incorporating rich media to offer a higher level of interactivity than banner ads. Interstitials are typically shown during natural transitions in your application, such as on app launch, after completing a game level, or while your app is downloading content from the internet. You can use the (MPInterstitialAdController) and its delegate callbacks to fetch and display interstitial ads in your app.


Before integrating interstitial ads in your app, you’ll need to follow the steps in our Get Started guide to create an account on MoPub and integrate the SDK into your project.

Basic integration

  1. In your view controller’s header file:
    • Import the MPInterstitialAdController.h header file and declare an MPInterstitialAdController *interstitial property.
    • Declare that your view controller implements the MPInterstitialAdControllerDelegate protocol.
  2. In your view controller’s implementation file, instantiate an MPInterstitialAdController using the class convenience method +interstitialAdControllerForAdUnitId:, passing in your ad unit ID.
  3. Register your view controller as the interstitial’s delegate. (e.g. self.interstitial.delegate = self;)
  4. Pre-fetch the interstitial ad by calling -loadAd on the interstitial.
  5. When you’d like to display the ad, check the ad’s ready property.
  6. If the ad is ready to be shown, call -showFromViewController: on the interstitial, passing in your view controller.

The following code snippets demonstrate the above steps in the context of a game application; specifically, how to pre-fetch an interstitial and display it after a level has ended.

IMPORTANT: If you are using MRC you’ll need to set the -fobjc-arc compiler flag on these files. Follow the instructions here.

// MyViewController.h

#import "MPInterstitialAdController.h"

@interface MyViewController : UIViewController <MPInterstitialAdControllerDelegate>

@property (nonatomic, retain) MPInterstitialAdController *interstitial;

// MyViewController.m

#import "MyViewController.h"

@implementation MyViewController

// Our loadView implementation will pre-fetch our interstitial ad.
- (void)loadView {
    // ... your other -loadView code ...
    [self loadInterstitial];

- (void)loadInterstitial {
    // Instantiate the interstitial using the class convenience method.
    self.interstitial = [MPInterstitialAdController

    // Fetch the interstitial ad.
    [self.interstitial loadAd];

// Present the ad only after it is ready.
- (void)levelDidEnd {
    if (self.interstitial.ready) [self.interstitial showFromViewController:self];
    else {
        // The interstitial wasn't ready, so continue as usual.

Optional Callbacks

MPInterstitialAdControllerDelegate includes a variety of optional callbacks that you can use to be notified of events, e.g. when an interstitial has successfully loaded, or when an interstitial is about to appear. Check out the MPInterstitialAdControllerDelegate in (MPInterstitialAdController.h)[] for a list of these methods.

Example 1 (Pre-fetching): You can be notified that an interstitial was fetched successfully by implementing -interstitialDidLoadAd:.

Example 2 (Presentation/dismissal callbacks): Suppose that your application is a game. You’d like to pause the game whenever you present an interstitial, and resume it when the interstitial is dismissed. You can accomplish this using the optional -interstitialWillAppear: and -interstitialDidDisappear delegate callbacks:

- (void)interstitialWillAppear:(MPInterstitialAdController *)interstitial {
    [self pauseGame];

- (void)interstitialDidDisappear:(MPInterstitialAdController *)interstitial {
    [self resumeGame];
 Called when an impression is fired on the @c MPMoPubAd instance. Includes information about the impression if applicable.

 @param ad The @c MPMoPubAd instance that fired the impression
 @param impressionData Information about the impression, or @c nil if the server didn't return any information.
- (void)mopubAd:(id<MPMoPubAd>)ad didTrackImpressionWithImpressionData:(MPImpressionData * _Nullable)impressionData;


Due to a known issue with WKWebView not respecting the ringer/mute switch settings to control volume, certain creatives might have audio on even when the device is on mute and the volume is non-zero.

Last updated December 19, 2019

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2020 MoPub (a division of Twitter, Inc.)