Interstitial Integration for iOS

The ironSource Mediation platform now supports Interstitials, the industry’s most popular ad format! The Interstitial Mediation is easy and simple to integrate within the ironSource SDK and will optimize user experience, fill rate and eCPM.

Serve Interstitial Ads through our Interstitial Mediation in 5 easy steps:

  1. Implement the Delegate
  2. Initialize the Interstitial
  3. Load Interstitial Ad
  4. Check Ad Availability
  5. Show Interstitial Ad

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. To receive these events, register to the delegate setISDelegate:isDelegate:

OBJECTIVE-C
[[Supersonic sharedInstance] setISDelegate:YOUR_INTERSTITIAL_DELEGATE];
SWIFT
let YOUR_INTERSTITIAL_DELEGATE:ISDelegate  = ISDelegate()
Note: Note: 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.

The SDK will notify your delegate of all possible events listed below:

OBJECTIVE-C
@interface ISDelegate : NSObject<SupersonicISDelegate>
@end
@implementation ISDelegate
/**
* Called when initiation process of the Interstitial products has finished successfully.
**/
-(void)supersonicISInitSuccess{}
/**
* Called each time an initiation stage fails, or if you have a problem in
* the integration
* You can learn about the reason by examining the 'error' value
**/
-(void)supersonicISInitFailedWithError:(NSError *)error{}
*
Invoked when Interstitial Ad is ready to be shown after load function was called.
*/
-(void) supersonicISReady{}
/**
* Called each time the Interstitial window has opened successfully.
**/
-(void)supersonicISShowSuccess{ }
/**
* Called if showing the Interstitial for the user has failed.
* You can learn about the reason by examining the ‘error’ value
**/
-(void)supersonicISShowFailWithError:(NSError *)error{ }
/**
* Called each time the end user has clicked on the Interstitial ad.
**/
-(void)supersonicISAdClicked{ }
/**
* Called each time the Interstitial window is about to close
**/
-(void)supersonicISAdClosed{ }
/**
Called each time the Interstitial window is about to open
**/
-(void)supersonicISAdOpened{}
/**
Invoked when there is no Interstitial Ad available after calling load function.
*/
-(void)supersonicISFailed{}
@end
SWIFT
class ISDelegate: NSObject, SupersonicISDelegate {
/**
* Called when initiation process of the Interstitial products has finished successfully.
**/
func supersonicISInitSuccess(){}
/**
* Called each time an initiation stage fails, or if you have a problem in
* the integration
* You can learn about the reason by examining the 'error' value
**/
func supersonicISInitFailedWithError(error:NSError){ }
/**
* Invoked when Interstitial Ad is ready to be shown after load function was called.
**/
func supersonicISReady(){ }
/**
* Called each time the Interstitial window has opened successfully.
**/
func supersonicISShowSuccess(){}
/**
* Called if showing the Interstitial for the user has failed.
* You can learn about the reason by examining the ‘error’ value
**/
func supersonicISShowFailWithError(error:NSError){ }
/**
* Called each time the end user has clicked on the Interstitial ad.
**/
func supersonicISAdClicked(){}
/**
* Called each time the Interstitial window is about to close
**/
func supersonicISAdClosed(){}
/**
Called each time the Interstitial window is about to open
**/
func supersonicISAdOpened(){}
/**
Called when there is no Interstitial Ad available after calling load function.
*/
func supersonicISFailed(){}
}
Note: Note:
  • The supersonicISAdOpened event conveys the ad format has takes over the app screen but does not indicate that an ad has been successfully served to your end-user.
  • The supersonicISShowSuccess event conveys an Interstitial Ad from Supersonic (ironSource) or any other ad network was successfully served to your end-user.

Step 2. Initialize the Interstitial Ad Unit

Once you initialize the Interstitial Ad Unit, you will be able to call functions on it.

OBJECTIVE-C
[[Supersonic sharedInstance] setISDelegate:YOUR_INTERSTITIAL_DELEGATE];
[[Supersonic sharedInstance] initISWithAppKey:APP_KEY withUserId:USER_ID];
SWIFT
Supersonic.sharedInstance().setISDelegate(YOUR_INTERSTITIAL_DELEGATE)
Supersonic.sharedInstance().initISWithAppKey(APP_KEY, withUserId:USER_ID)
Note: Note:
  • APP_KEY is the unique ID of your Application in your ironSource account.
    ironsource-platform-app-key
  • USER_ID is the unique ID of your end user. We support NSString from 1 to 64 characters. Common practice is to use the Apple IDFV (Identifier for Vendor).
    Important! You must enter a unique user ID for each individual user.  Neglecting this field will cause a significant decrease in fill rate and ad performance for your app. Find more information on User IDs and how to generate them here.
  • For a full description of Interstitial events from the delegate, see Step 1.

Step 3. 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 time. Before calling the load method, make sure you received supersonicISInitSuccess first. 
To request an interstitial ad, call the following method:

OBJECTIVE-C
[[Supersonic sharedInstance] loadIS];
SWIFT
Supersonic.sharedInstance(). loadIS()
Note: 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 supersonicISAdClosed function is fired, you will be able to load a new Interstitial ad. 

Step 4. Check Ad Availability

After you have received the supersonicISInitSuccess() callback and you’ve called the loadIS in Step 3, you will be notified when the ad is loaded with the supersonicISReady().

OBJECTIVE-C
-(void)supersonicISReady(){}
SWIFT
func supersonicISReady(){}

Alternatively, you can request the ad availability directly by calling the following function:

OBJECTIVE-C
[[Supersonic sharedInstance] isInterstitialAvailable];
SWIFT
Supersonic.sharedInstance().isInterstitialAvailable()

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 5. Show Interstitial Ad

Once you receive the supersonicISReady callback, you are ready to show an Interstitial Ad to your users. Invoke the following method on your Supersonic Instance to serve an interstitial ad to your users.

- (void)showISWithViewController:(UIViewController *)viewController placementName:(NSString )placementName;

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 3 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: