Integrating Interstitial Ads

Document created by pubmatic-archivist on Mar 27, 2017
Version 1Show Document
  • View in full screen mode

Integrating Interstitial Ads


PubMatic SDK supports Banner ad serving from PubMatic and Mocean Ad Server. Interstitial ads are full-screen ads displayed at transition points in the application, for example, when the app is launched, or when moving between screens, and others. Interstitial ads always include a Close button. You can optionally configure them to close automatically after some time has elapsed.

To create an interstitial layout:

  1. Use the custom-ad view showInterstitial() method; the ad appears in front of your activity screens until dismissed.
  2. Create interstitial ads exclusively in code.
  3. Call either the showInterstitial() or showInterstitialWithDuration() method after calling the execute() method on AdView.
    The interstitial ad is not shown until one of these methods are called.

Best Practices: For faster display of interstitial ads, call the showInterstitial() or showInterstitialWithDuration() method in the bannerAdViewDidRecieveAd() callback. This ensures that a full-screen interstitial ad view is shown only when the ad is successfully received from the server.


Example: Interstitial Ad



//Initializes PMInterstitialAdView 


PMInterstitialAdView  *interstitialAdView = [[ PMInterstitialAdView  alloc] initInterstitial] ;

interstitialAdView.logLevel = PMAdViewLogEventTypeDebug;

interstitialAdView.delegate = self;

[interstitialAdView execute:self.adRequest];


//Implement below methods of PMBannerAdViewDelegate in viewcontroller

-(void)bannerAdView:(PMBannerAdView *)adView didReceiveThirdPartyRequest:(NSDictionary *)properties withParams:(NSDictionary *)params{


- (void)bannerAdView:( PMBannerAdView  *)adView didFailToReceiveAdWithError:(NSError *)error{


-(void)bannerAdViewDidRecieveAd:( PMBannerAdView *)adView {

    [adView showInterstitial];


Note: call [interstitialAdView reset], method in dealloc method of its controller class. Please refer sample application for same.