ALInterstitialAd Class Reference

Inherits from NSObject
Declared in ALInterstitialAd.h

Overview

This class is used to display full-screen ads to the user.

  adLoadDelegate

An object conforming to the ALAdLoadDelegate protocol, which, if set, will be notified of ad load events.

@property (strong, nonatomic, alnullable) id<ALAdLoadDelegate> adLoadDelegate

Discussion

An object conforming to the ALAdLoadDelegate protocol, which, if set, will be notified of ad load events.

Declared In

ALInterstitialAd.h

  adDisplayDelegate

An object conforming to the ALAdDisplayDelegate protocol, which, if set, will be notified of ad show/hide events.

@property (strong, nonatomic, alnullable) id<ALAdDisplayDelegate> adDisplayDelegate

Discussion

An object conforming to the ALAdDisplayDelegate protocol, which, if set, will be notified of ad show/hide events.

Declared In

ALInterstitialAd.h

  adVideoPlaybackDelegate

An object conforming to the ALAdVideoPlaybackDelegate protocol, which, if set, will be notified of video start/finish events.

@property (strong, nonatomic, alnullable) id<ALAdVideoPlaybackDelegate> adVideoPlaybackDelegate

Discussion

An object conforming to the ALAdVideoPlaybackDelegate protocol, which, if set, will be notified of video start/finish events.

Declared In

ALInterstitialAd.h

+ show

Show an interstitial over the application’s key window. This will load the next interstitial and display it.

+ (ALInterstitialAd *)show

Discussion

Show an interstitial over the application’s key window. This will load the next interstitial and display it.

Note that this method is functionally equivalent to calling showOver: and passing [[UIApplication sharedApplication] keyWindow].

Declared In

ALInterstitialAd.h

+ showOver:

Show a new interstitial ad. This method will display an interstitial* over the given UIWindow.

+ (ALInterstitialAd *)showOver:(UIWindow *)window

Parameters

window

A window to show the interstitial over

Discussion

Show a new interstitial ad. This method will display an interstitial* over the given UIWindow.

Declared In

ALInterstitialAd.h

+ shared

Get a reference to the shared singleton instance.

+ (ALInterstitialAd *)shared

Discussion

Get a reference to the shared singleton instance.

This method calls [ALSdk shared] which requires you to have an SDK key defined in Info.plist. If you use [ALSdk sharedWithKey: …] then you will need to use the instance methods instead.

Declared In

ALInterstitialAd.h

– show

Show an interstitial over the application’s key window. This will load the next interstitial and display it.

- (void)show

Discussion

Show an interstitial over the application’s key window. This will load the next interstitial and display it.

Note that this method is functionally equivalent to calling showOver: and passing [[UIApplication sharedApplication] keyWindow].

Declared In

ALInterstitialAd.h

– showOver:

Show an interstitial over a given window.

- (void)showOver:(UIWindow *)window

Parameters

window

An instance of window to show the interstitial over.

Discussion

Show an interstitial over a given window.

Declared In

ALInterstitialAd.h

– showOver:andRender:

Show current interstitial over a given window and render a specified ad loaded by ALAdService.

- (void)showOver:(UIWindow *)window andRender:(ALAd *)ad

Parameters

window

An instance of window to show the interstitial over.

ad

The ad to render into this interstitial.

Discussion

Show current interstitial over a given window and render a specified ad loaded by ALAdService.

Declared In

ALInterstitialAd.h

– dismiss

Dismiss this interstitial.

- (void)dismiss

Discussion

Dismiss this interstitial.

In general, this is not recommended as it negatively impacts click through rate.

Declared In

ALInterstitialAd.h

– initWithSdk:

Init this interstitial ad with a custom SDK instance.

- (instancetype)initWithSdk:(ALSdk *)sdk

Parameters

sdk

Instance of AppLovin SDK to use.

Discussion

Init this interstitial ad with a custom SDK instance.

To simply display an interstitial, use [ALInterstitialAd showOver:window]

Declared In

ALInterstitialAd.h

– initWithFrame:sdk:

Init this interstitial ad with a custom SDK instance and frame.

- (instancetype)initWithFrame:(CGRect)frame sdk:(ALSdk *)sdk

Parameters

frame

Frame to use with the new interstitial.

sdk

Instance of AppLovin SDK to use.

Discussion

Init this interstitial ad with a custom SDK instance and frame.

To simply display an interstitial, use [ALInterstitialAd showOver:window]. In general, setting a custom frame is not recommended, unless absolutely necessary. Interstitial ads are intended to be full-screen and may not look right if sized otherwise.

Declared In

ALInterstitialAd.h

  frame

Frame to be passed through to the descendent UIView containing this interstitial.

@property (assign, nonatomic) CGRect frame

Discussion

Frame to be passed through to the descendent UIView containing this interstitial.

Note that this has no effect on video ads, as they are presented in their own view controller.

Declared In

ALInterstitialAd.h

  hidden

Hidden setting to be passed through to the descendent UIView containing this interstitial.

@property (assign, nonatomic) BOOL hidden

Discussion

Hidden setting to be passed through to the descendent UIView containing this interstitial.

Note that this has no effect on video ads, as they are presented in their own view controller.

Declared In

ALInterstitialAd.h