Interstitial Integration for iOS

The ironSource Interstitial is a full-screen ad unit, usually served at natural transition points during the app lifecycle. We support both static and video interstitials. You can also serve interstitials through the ironSource Mediation platform.

Before You Start
Make sure you have correctly integrated the ironSource SDK into your application. Integration is outlined here.

Step 1. Implement the Delegate

The ironSource SDK fires several events to inform you of Interstitial Activity. The SDK will notify your delegate of all possible events listed below:

#pragma mark - ISInterstitialDelegate
//Invoked when Interstitial Ad is ready to be shown after load function was //called.
-(void)interstitialDidLoad
//Called each time the Interstitial window has opened successfully.
-(void)interstitialDidShow
// Called if showing the Interstitial for the user has failed.
//You can learn about the reason by examining the ‘error’ value
-(void)interstitialDidFailToShowWithError:(NSError *)error
//Called each time the end user has clicked on the Interstitial ad.
-(void)didClickInterstitial
//Called each time the Interstitial window is about to close
-(void)interstitialDidClose
//Called each time the Interstitial window is about to open
-(void)interstitialDidOpen
//Invoked when there is no Interstitial Ad available after calling load //function. @param error - will contain the failure code and description.
-(void)interstitialDidFailToLoadWithError:(NSError *)error
@end
//MARK: ISInterstitialDelegate Functions
    /**
     Called after an interstitial has been clicked.
     */
    public func didClickInterstitial() {
         
    }
    
    /**
     Called after an interstitial has attempted to show but failed.
     
     @param error The reason for the error
     */
    public func interstitialDidFailToShowWithError(_ error: Error!) {
         
    }
    
    /**
     Called after an interstitial has been displayed on the screen.
     */
    public func interstitialDidShow() {
         
    }
    
    /**
     Called after an interstitial has been dismissed.
     */
    public func interstitialDidClose() {
    
    }
    
    /**
     Called after an interstitial has been opened.
     */
    public func interstitialDidOpen() {
    
    }
    
    /**
     Called after an interstitial has attempted to load but failed.
     
     @param error The reason for the error
     */
    public func interstitialDidFailToLoadWithError(_ error: Error!) {
         
    }
    
    /**
     Called after an interstitial has been loaded
     */
    public func interstitialDidLoad() {
         
    }
Note:

  • The interstitialDidOpen and interstitialDidShow events convey that the ad format has taken over the app screen and been displayed but does not indicate that an ad has been successfully served to your end-user.
  • Do not assume the callbacks are always running on the main thread. Any UI interaction or updates resulting from ironSource callbacks need to be passed to the main thread before executing.

Step 2. Load Interstitial Ad

We recommend requesting an Interstitial Ad a short while before you plan on showing it to your users as the loading process can take some time. We don’t recommend making consecutive requests for an interstitial ad in a short timespan. Numerous requests in a short period of time have no added value as the chance of available inventory within this time is unlikely.

To request an interstitial ad, call the following method:

[IronSource loadInterstitial];
IronSource.loadInterstitial()
Note: If you’d like to serve several Interstitial Ads in your application, you must repeat this step after you’ve shown and closed the previous Interstitial Ad. Once the interstitialDidClose function is fired, you will be able to load a new Interstitial ad. 

Step 3. Check Ad Availability

After you call the loadInterstitial in Step 2, you will be notified when the ad is loaded through the delegate with the method interstitialDidLoad.

//Called after an interstitial has been loaded
- (void)interstitialDidLoad;
/**
 Called after an interstitial has been loaded
*/
  public func interstitialDidLoad() {
         
    }

Alternatively, you can request the ad availability directly by calling the following function and it will return a true or false boolean:

[IronSource hasInterstitial];
IronSource.hasInterstitial()

Once the Interstitial ad is available you will be able to show the ad to your users. With ironSource’s Ad Placements, you can customize and optimize the Interstitial experience. This tool enables you to present Interstitial ads to your users in different places, i.e. app launch, between levels, etc. You can use the function in the next step to define the exact placement you’d like to show an ad from.

In addition to ironSource’s Ad Placements, you can now configure capping and pacing settings for selected placements. Capping and pacing improves the user experience in your app by limiting the amount of ads served within a defined timeframe.

Navigate to the Ad Placement document for more details.

Step 4. Show Interstitial Ad

Once you receive the ISAdReady callback, you are ready to show an Interstitial Ad to your users.

Invoke the following method to serve an Interstitial ad to your users:

(void)showInterstitialWithViewController:(UIViewController *)viewController;
IronSource.showInterstitial(with: <UIViewController>)

If you’ve set up placements for your Interstitial, call the following method to serve an Interstitial ad in a specific placement:

[IronSource showInterstitialWithViewController:YOUR_VIEWCONTROLLER placement:YOUR_PLACEMENT_NAME]
IronSource.showInterstitial(with: <UIViewController>, placement: <String?>)

Important! Once you’ve successfully completed step 5, you will have shown your user an Interstitial Ad. In the case you want to serve another Interstitial ad, you must repeat Step 2 to request an additional Interstitial.
 

Done!
You can now deliver ironSource Interstitial Ads through the Interstitial Mediation platform!

First Time Integration Tip

If this is a new integration for your application, your app will by default be in ‘Test Mode‘ on your ironSource dashboard. While your app is in Test Mode, the ironSource SDK will print more logs to the console in order to provide greater visibility into the SDK processes. To test your ad inventory, set up your Test Devices. Until you turn on live ad inventory, you will receive test campaigns that don’t generate revenue. Make sure to select ‘Go Live! on the Ad Units page when your app is ready for live ad inventory.
Supersonic Switch App to Live Mode Rewarded Video Ad Unitironsource-go-live-with-rewarded-video

 

What’s Next?
Follow our integration guides to integrate additional Interstitial Ad networks or configure additional ad units: