ALIncentivizedInterstitialAd Class Reference

Inherits from NSObject
Declared in ALIncentivizedInterstitialAd.h

Overview

This class is used to show rewarded videos to the user. These differ from regular interstitials in that they allow you to provide you user virtual currency in exchange for watching a video.

  adDisplayDelegate

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

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

Discussion

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

Declared In

ALIncentivizedInterstitialAd.h

  adVideoPlaybackDelegate

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

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

Discussion

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

Declared In

ALIncentivizedInterstitialAd.h

+ shared

Get a reference to the shared instance of ALIncentivizedInterstitialAd.

+ (ALIncentivizedInterstitialAd *)shared

Discussion

Get a reference to the shared instance of ALIncentivizedInterstitialAd.

This wraps the [ALSdk shared] call, and will only work if you hve set your SDK key in Info.plist.

Declared In

ALIncentivizedInterstitialAd.h

+ preloadAndNotify:

Pre-load an incentivized interstitial, and notify your provided Ad Load Delegate.

+ (void)preloadAndNotify:(nullable id<ALAdLoadDelegate>)adLoadDelegate

Parameters

adLoadDelegate

The delegate to notify that preloading was completed. May be nil.

Discussion

Pre-load an incentivized interstitial, and notify your provided Ad Load Delegate.

Invoke once to preload, then do not invoke again until the ad has has been closed (e.g., ALAdDisplayDelegate’s adWasHidden callback). You may pass a nil argument to preloadAndNotify if you intend to use the synchronous ( isIncentivizedAdReady ) flow. Note that this is NOT recommended; we HIGHLY RECOMMEND you use an ad load delegate. This method uses the shared instance, and will only work if you have set your SDK key in Info.plist. Note that we internally try to pull down the next ad’s resources before you need it. Therefore, this method may complete immediately in many circumstances.

Declared In

ALIncentivizedInterstitialAd.h

+ isReadyForDisplay

Check if an ad is currently ready on this object. You must call preloadAndNotify in order to reach this state.

+ (BOOL)isReadyForDisplay

Return Value

YES if an ad has been loaded into this incentivized interstitial and is ready to display. NO otherwise.

Discussion

Check if an ad is currently ready on this object. You must call preloadAndNotify in order to reach this state.

It is highly recommended that you implement an asynchronous flow (using an ALAdLoadDelegate with preloadAndNotify) rather than checking this property. This class does not contain a queue and can hold only one preloaded ad at a time. Therefore, you should NOT simply call preloadAndNotify: any time this method returns NO; it is important to invoke only one ad load - then not invoke any further loads until the ad has been closed (e.g., ALAdDisplayDelegate’s adWasHidden callback).

Declared In

ALIncentivizedInterstitialAd.h

+ show

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

+ (void)show

Discussion

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

You must call preloadAndNotify before calling showOver.

Declared In

ALIncentivizedInterstitialAd.h

+ showAndNotify:

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

+ (void)showAndNotify:(nullable id<ALAdRewardDelegate>)adRewardDelegate

Parameters

adRewardDelegate

The reward delegate to notify upon validating reward authenticity with AppLovin.

Discussion

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

You must call preloadAndNotify before calling showOver.

Using the ALAdRewardDelegate, you will be able to verify with AppLovin servers the the video view is legitimate, as we will confirm whether the specific ad was actually served - then we will ping your server with a url for you to update the user’s balance. The Reward Validation Delegate will tell you whether we were able to reach our servers or not. If you receive a successful response, you should refresh the user’s balance from your server. For more info, see the documentation.

Declared In

ALIncentivizedInterstitialAd.h

– initWithSdk:

Initialize an incentivized interstitial with a specific custom SDK.

- (instancetype)initWithSdk:(ALSdk *)sdk

Parameters

sdk

An SDK instance to use.

Discussion

Initialize an incentivized interstitial with a specific custom SDK.

This is necessary if you use [ALSdk sharedWithKey: …].

Declared In

ALIncentivizedInterstitialAd.h

– initWithZoneIdentifier:

Initialize an incentivized interstitial with a zone.

- (instancetype)initWithZoneIdentifier:(NSString *)zoneIdentifier

Parameters

zoneIdentifier

The identifier of the zone for which to load ads for.

Discussion

Initialize an incentivized interstitial with a zone.

Declared In

ALIncentivizedInterstitialAd.h

– initWithZoneIdentifier:sdk:

Initialize an incentivized interstitial with a zone and a specific custom SDK.

- (instancetype)initWithZoneIdentifier:(NSString *)zoneIdentifier sdk:(ALSdk *)sdk

Parameters

zoneIdentifier

The identifier of the zone for which to load ads for.

sdk

An SDK instance to use.

Discussion

Initialize an incentivized interstitial with a zone and a specific custom SDK.

This is necessary if you use [ALSdk sharedWithKey: …].

Declared In

ALIncentivizedInterstitialAd.h

  zoneIdentifier

The zone identifier this incentivized ad was initialized with and is loading ads for, if any.

@property (copy, nonatomic, readonly, nullable) NSString *zoneIdentifier

Discussion

The zone identifier this incentivized ad was initialized with and is loading ads for, if any.

Declared In

ALIncentivizedInterstitialAd.h

– preloadAndNotify:

Pre-load an incentivized interstitial, and notify your provided Ad Load Delegate.

- (void)preloadAndNotify:(nullable id<ALAdLoadDelegate>)adLoadDelegate

Parameters

adLoadDelegate

The delegate to notify that preloading was completed.

Discussion

Pre-load an incentivized interstitial, and notify your provided Ad Load Delegate.

Invoke once to preload, then do not invoke again until the ad has has been closed (e.g., ALAdDisplayDelegate’s adWasHidden callback). You may pass a nil argument to preloadAndNotify if you intend to use the synchronous ( isIncentivizedAdReady ) flow. Note that this is NOT recommended; we HIGHLY RECOMMEND you use an ad load delegate. Note that we internally try to pull down the next ad’s resources before you need it. Therefore, this method may complete immediately in many circumstances.

Declared In

ALIncentivizedInterstitialAd.h

  readyForDisplay

Check if an ad is currently ready on this object. You must call preloadAndNotify in order to reach this state.

@property (readonly, atomic, getter=isReadyForDisplay) BOOL readyForDisplay

Return Value

YES if an ad has been loaded into this incentivized interstitial and is ready to display. NO otherwise.

Discussion

Check if an ad is currently ready on this object. You must call preloadAndNotify in order to reach this state.

It is highly recommended that you implement an asynchronous flow (using an ALAdLoadDelegate with preloadAndNotify) rather than checking this property. This class does not contain a queue and can hold only one preloaded ad at a time. Therefore, you should NOT simply call preloadAndNotify: any time this method returns NO; it is important to invoke only one ad load - then not invoke any further loads until the ad has been closed (e.g., ALAdDisplayDelegate’s adWasHidden callback).

Declared In

ALIncentivizedInterstitialAd.h

– show

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

- (void)show

Discussion

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

You must call preloadAndNotify before calling showOver.

Declared In

ALIncentivizedInterstitialAd.h

– showAndNotify:

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

- (void)showAndNotify:(nullable id<ALAdRewardDelegate>)adRewardDelegate

Parameters

adRewardDelegate

The reward delegate to notify upon validating reward authenticity with AppLovin.

Discussion

Show an incentivized interstitial over the current key window, using the most recently pre-loaded ad.

You must call preloadAndNotify before calling showOver.

Using the ALAdRewardDelegate, you will be able to verify with AppLovin servers the the video view is legitimate, as we will confirm whether the specific ad was actually served - then we will ping your server with a url for you to update the user’s balance. The Reward Validation Delegate will tell you whether we were able to reach our servers or not. If you receive a successful response, you should refresh the user’s balance from your server. For more info, see the documentation.

Declared In

ALIncentivizedInterstitialAd.h

– showAd:andNotify:

Show an incentivized interstitial, using the most recently pre-loaded ad.

- (void)showAd:(ALAd *)ad andNotify:(nullable id<ALAdRewardDelegate>)adRewardDelegate

Parameters

ad

The ad to render into this incentivized ad.

adRewardDelegate

The reward delegate to notify upon validating reward authenticity with AppLovin.

Discussion

Show an incentivized interstitial, using the most recently pre-loaded ad.

You must call preloadAndNotify before calling showOver.

Using the ALAdRewardDelegate, you will be able to verify with AppLovin servers that the video view is legitimate, as we will confirm whether the specific ad was actually served - then we will ping your server with a url for you to update the user’s balance. The Reward Validation Delegate will tell you whether we were able to reach our servers or not. If you receive a successful response, you should refresh the user’s balance from your server. For more info, see the documentation.

Declared In

ALIncentivizedInterstitialAd.h