Skip to content

Interstitial

Banners are small ads that when touched typically take the user to some form of fullscreen in-app browsing experience.

Interstitials, on the other hand, immediately present rich HTML5 experiences or web apps at natural app transition points such as app launch, video pre-roll or game level load.

Preload vs. Interstitial

A preload ad will show up on app launch and an interstitial ad will show up between two activities.

Implementation for an interstitial ad is very similar to banner except that it is displayed fullscreen

Hiding status bar

View controller-based status bar appearance should be set to YES/true, so it hides the status bar properly.

To add an interstitial ad to your view it takes only a few lines of code:

  • Create an new instance of ADvantage instance in your code (pass your license key, siteId and position to its constructor)
Swift
var interstitial = ADvantage(preloadWithLicenseKey: "...", siteId: "...", position: "...")

override func viewDidLoad() {
super.viewDidLoad()

//Optionally add a custom loading picture, before the ad appears
interstitial.loadingPicture = "somepicture.png"
//Optionally select if you want it to be partially transparent or not
interstitial.transparentInterstitial = false

interstitial.delegate = self
interstitial.requestAd()
Objective-c
ADvantage *interstitial = [[ADvantage alloc] initPreloadWithLicenseKey:@"..." SiteId:@"..." Position:@"..."];
//Optionally add a custom loading picture, before the ad appears
[interstitial setLoadingPicture:@"somepicture.png"];
//Optionally select if you want it to be partially transparent or not
[interstitial setTransparentInterstitial:NO];

interstitial.delegate = self;
[interstitial requestAd];
  • Call showInterstitial after the ad has being loaded
Swift
func advantage(_ advantage: ADvantage, didLoad state: AVLoadedState) {
    advantage.showInterstitial()
}
Objective-c
- (void)advantage:(ADvantage *)advantage didLoad:(AVLoadedState)state{
    if ( state == AVLoadedWithAd ) {
      [advantage showInterstitial];
    }
}