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, alnullable) id<ALAdDisplayDelegate> adDisplayDelegateDiscussion
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, alnullable) id<ALAdVideoPlaybackDelegate> adVideoPlaybackDelegateDiscussion
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 *)sharedDiscussion
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:(alnullable id<ALAdLoadDelegate>)adLoadDelegateParameters
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)isReadyForDisplayReturn 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)showDiscussion
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:(alnullable id<ALAdRewardDelegate>)adRewardDelegateParameters
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
+ showOver:andNotify:
Show an incentivized interstitial, using the most recently pre-loaded ad.
+ (void)showOver:(UIWindow *)window andNotify:(alnullable id<ALAdRewardDelegate>)adRewardDelegateParameters
window |
The UIWindow over which the rewarded video should be displayed. |
|---|---|
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 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 *)sdkParameters
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 *)zoneIdentifierParameters
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 *)sdkParameters
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, alnullable) NSString *zoneIdentifierDiscussion
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:(alnullable id<ALAdLoadDelegate>)adLoadDelegateParameters
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 readyForDisplayReturn 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)showDiscussion
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:(alnullable id<ALAdRewardDelegate>)adRewardDelegateParameters
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
– showOver:andNotify:
Show an incentivized interstitial, using the most recently pre-loaded ad.
- (void)showOver:(UIWindow *)window andNotify:(alnullable id<ALAdRewardDelegate>)adRewardDelegateParameters
window |
The UIWindow over which the rewarded video should be displayed. |
|---|---|
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
– showOver:renderAd:andNotify:
Show an incentivized interstitial, using the most recently pre-loaded ad.
- (void)showOver:(UIWindow *)window renderAd:(ALAd *)ad andNotify:(alnullable id<ALAdRewardDelegate>)adRewardDelegateParameters
window |
The UIWindow over which the rewarded video should be displayed. |
|---|---|
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
– dismiss
Dismiss an incentivized interstitial prematurely, before video playback has completed.
- (void)dismissDiscussion
Dismiss an incentivized interstitial prematurely, before video playback has completed.
In most circumstances, this is not recommended, as it may confuse users by denying them a reward.
Declared In
ALIncentivizedInterstitialAd.h
+ setUserIdentifier:
Set a string which identifies the current user, which will be passed through to your server via our optional S2S postbacks.
+ (void)setUserIdentifier:(alnullable NSString *)userIdentifierParameters
userIdentifier |
Some descriptive string identifying the user, usually a username. |
|---|
Discussion
Set a string which identifies the current user, which will be passed through to your server via our optional S2S postbacks.
If you’re using reward validation, you can optionally set a user identifier to be included with currency validation postbacks. For example, a user name. We’ll include this in the postback when we ping your currency endpoint from our server.
Declared In
ALIncentivizedInterstitialAd.h
+ userIdentifier
Get the currently set user identification string.
+ (alnullable NSString *)userIdentifierReturn Value
The last value supplied via setUserIdentifier:
Discussion
Get the currently set user identification string.
Declared In
ALIncentivizedInterstitialAd.h