Setting up an Interstitial Ad
Interstitial ads are full-screen ads that cover the interface of the app. They’re typically displayed at natural transition points in the flow of the app.Initialising an ad
Start by initialising an instance of aCIInterstitialAd with the following parameters:
Required:
placementID: String: Unique ID for this Ad Placement provided by Content Ignite.pageUrl: String?: URL used for targeting for example if the ad is displayed in a section of the app which has an equivalent URL on the web.eventListener: CIInterstitialEventListener: This protocol allows you to respond to events related to the interstitial ad.
Optional:
publisher: Optional lambda to provide a fallback to your existing Ad implementation for this particular interstitial. This gives publishers full control over the use of the SDK and the rate at which this fallback is used can be controlled directly through the Fusion platform.
Load the ad
When you are ready to load the ad, callload() on the ad instance:
Handling ad events
To listen and respond to events from an Interstitial ad, use theCIInterstitialEventListener protocol:
Show the ad
When you are ready to display the ad, such as after a transition in the app flow, use theshow method to display the ad providing the current Activity: