Focus mode

Interstitials

An interstitial is a full-screen ad that can be hidden by the user. 

Setup TappxInterstitialAd (Basic)

Create an interstitial adding your Tappx key and load the ad as per example below. 

#import <TappxFramework/TappxAds.h>

@interface ViewController ()<TappxInterstitialAdDelegate>
   @property (retain, nonatomic) TappxInterstitialAd* tappxInterstitial;
@end

@implementation ViewController

- (void)viewDidLoad {
   [super viewDidLoad];
  _tappxInterstitial = [[TappxInterstitialAd alloc] initWithDelegate:self];
  [_tappxInterstitial setAutoShowWhenReady:YES];
  [_tappxInterstitial load];
}

@end
import UIKit
import TappxFramework

class ViewController: UIViewController
{
   var tappxInterstitial: TappxInterstitialAd?
   override func viewDidLoad() {
       super.viewDidLoad()
       self.tappxInterstitial = TappxInterstitialAd(delegate: self)
       self.tappxInterstitial?.setAutoShowWhenReady(enable: true)
       self.tappxInterstitial?.load()
   }
}
import SwiftUI
import TappxFramework

class ViewController: View{
    
    var tappxInterstitial: TappxInterstitialAd!

    override func viewDidLoad() {
        super.viewDidLoad()
        tappxInterstitial= TappxInterstitialAd(delegate: self)
        tappxInterstitial?.setAutoShowWhenReady(enable: true)
        tappxInterstitial.load()
    }
}

Then request it and show it as soon as possible, using the setAutoShowWhenReady method.

[_tappxInterstitial setAutoShowWhenReady:YES];
self.tappxInterstitial?.setAutoShowWhenReady(enable: true)
self.tappxInterstitial?.setAutoShowWhenReady(enable: true)

Setup TappxInterstitialAd (Recommended)

To have more control over your interstitial ads, you can use load, isReady and show.

#import <TappxFramework/TappxAds.h>

@interface ViewController ()<TappxInterstitialAdDelegate>
   @property (retain, nonatomic) TappxInterstitialAd* tappxInterstitial;
@end

@implementation ViewController

- (void)viewDidLoad {
   [super viewDidLoad];
  _tappxInterstitial = [[TappxInterstitialAd alloc] initWithDelegate:self];
  [_tappxInterstitial setAutoShowWhenReady:NO];
  [_tappxInterstitial load];
}

@end
import UIKit
import TappxFramework

class ViewController: UIViewController
{
   var tappxInterstitial: TappxInterstitialAd?
   override func viewDidLoad() {
       super.viewDidLoad()
       self.tappxInterstitial = TappxInterstitialAd(delegate: self)
       self.tappxInterstitial?.setAutoShowWhenReady(enable: false)
       self.tappxInterstitial?.load()
   }
}
import SwiftUI
import TappxFramework

class ViewController: View{
    
    var tappxInterstitial: TappxInterstitialAd!

    override func viewDidLoad() {
        super.viewDidLoad()
        tappxInterstitial= TappxInterstitialAd(delegate: self)
        tappxInterstitial?.setAutoShowWhenReady(enable: false)
        tappxInterstitial.load()
    }
}

load is the request to load the ad and all the information so you can show the ad when you need to.

[_tappxInterstitial load];
self.tappxInterstitial?.load()
self.tappxInterstitial?.load()

isReady lets you check if the ad is ready to be shown. You will receive a "true" if the ad is ready and a "false" if not.

[_tappxInterstitial isReady];

self.tappxInterstitial?.isReady()
self.tappxInterstitial?.isReady()

show lets you display the interstitial ad that has loaded previously.

[_tappxInterstitial show];
self.tappxInterstitial?.show()
self.tappxInterstitial?.show()

TIP: we also recommend sending additional information with your ad requests to improve performance. Check Advanced Settings section.

Set Delegates

Use delegates methods to be notified when a specific event happens. 

-(void) tappxInterstitialAdDidFinishLoad:(TappxInterstitialAd*) viewController{
   NSLog(@"INTERSTITIAL: FinishLoad");
}


-(void) tappxInterstitialAdDidFail:(TappxInterstitialAd) viewController
withError:(TappxErrorAd) error{
   NSLog(@"INTERSTITIAL: DidFail %@", error.descriptionError);
}


-(void) tappxInterstitialAdDidPress:(TappxInterstitialAd*) viewController{
   NSLog(@"INTERSTITIAL: DidPress");
}


-(void) tappxInterstitialAdDidClose:(TappxInterstitialAd*) viewController{
   NSLog(@"INTERSTITIAL: DidClose");
}


-(void) tappxInterstitialAdDidAppear:(TappxInterstitialAd*) viewController{
   NSLog(@"INTERSTITIAL: DidAppear");
}
extension ViewController: TappxInterstitialAdDelegate {
  public func tappxInterstitialAdDidFinishLoad(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: FinishLoad")
  }
  public func tappxInterstitialAdDidFail(viewController: TappxInterstitialAd!, withError error: Error!) {
     print("INTERSTITIAL: Failed %@", error.localizedDescription)
  }
  public func tappxInterstitialAdDidPress(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: DidPress")
  }
  public func tappxInterstitialAdDidClose(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: DidClose")
  }
  public func tappxInterstitialAdDidAppear(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: DidAppear")
  }
}
extension ViewController: TappxInterstitialAdDelegate {
  public func tappxInterstitialAdDidFinishLoad(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: FinishLoad")
  }
  public func tappxInterstitialAdDidFail(viewController: TappxInterstitialAd!, withError error: Error!) {
     print("INTERSTITIAL: Failed %@", error.localizedDescription)
  }
  public func tappxInterstitialAdDidPress(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: DidPress")
  }
  public func tappxInterstitialAdDidClose(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: DidClose")
  }
  public func tappxInterstitialAdDidAppear(_viewController: TappxInterstitialAd!) {
     print("INTERSTITIAL: DidAppear")
  }
}

Examples on GitHub

Interstitial ads example: Objective-C | Swift | SwiftUI

Complete demo: Objective-C | Swift | SwiftUI

Interstitials
×

Tappx logo white

Important Security Notice
Beware of scammers impersonating Tappx brand

We have identified fraudulent activities where malicious actors are imitating Tappx assets. These scams may compromise your security.

⚠️ Warning: The URL you came from has been flagged as potentially harmful. 

To stay safe, only trust communications and services from the official Tappx domain: tappx.com

×

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Etiam elit tortor, consequat sit amet ultricies ut, pellentesque a magna. Etiam mattis odio ut nibh pulvinar bibendum. Curabitur porta gravida urna sit amet tincidunt. Etiam sit amet nunc vulputate, blandit mauris sit amet, lacinia arcu. Morbi in orci tincidunt, tincidunt dolor vitae, hendrerit sem. Etiam in suscipit purus. Morbi dignissim vitae nibh ut condimentum.

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.