ALAdRewardDelegate Protocol Reference

Conforms to NSObject
Declared in ALAdRewardDelegate.h

Overview

This protocol defines a listener for rewarded video events.

– rewardValidationRequestForAd:didSucceedWithResponse: required method

This method is invoked if a user viewed a rewarded video and their reward was approved by the AppLovin server.

- (void)rewardValidationRequestForAd:(ALAd *)ad didSucceedWithResponse:(NSDictionary *)response

Parameters

ad

Ad which was viewed.

response

Dictionary containing response data, including “currency” and “amount”.

Discussion

This method is invoked if a user viewed a rewarded video and their reward was approved by the AppLovin server.

If you are using reward validation for incentivized videos, this method will be invoked if we contacted AppLovin successfully. This means that we believe the reward is legitimate and should be awarded. Please note that ideally you should refresh the user’s balance from your server at this point to prevent tampering with local data on jailbroken devices.

The response NSDictionary will typically includes the keys “currency” and “amount”, which point to NSStrings containing the name and amount of the virtual currency to be awarded.

Declared In

ALAdRewardDelegate.h

– rewardValidationRequestForAd:didExceedQuotaWithResponse: required method

This method will be invoked if we were able to contact AppLovin, but the user has already received the maximum number of coins you allowed per day in the web UI.

- (void)rewardValidationRequestForAd:(ALAd *)ad didExceedQuotaWithResponse:(NSDictionary *)response

Parameters

ad

Ad which was viewed.

response

Dictionary containing response data from the server.

Discussion

This method will be invoked if we were able to contact AppLovin, but the user has already received the maximum number of coins you allowed per day in the web UI.

Declared In

ALAdRewardDelegate.h

– rewardValidationRequestForAd:wasRejectedWithResponse: required method

This method will be invoked if the AppLovin server rejected the reward request. This would usually happen if the user fails to pass an anti-fraud check.

- (void)rewardValidationRequestForAd:(ALAd *)ad wasRejectedWithResponse:(NSDictionary *)response

Parameters

ad

Ad which was viewed.

response

Dictionary containing response data from the server.

Discussion

This method will be invoked if the AppLovin server rejected the reward request. This would usually happen if the user fails to pass an anti-fraud check.

Declared In

ALAdRewardDelegate.h

– rewardValidationRequestForAd:didFailWithError: required method

This method will be invoked if were unable to contact AppLovin, so no ping will be heading to your server.

- (void)rewardValidationRequestForAd:(ALAd *)ad didFailWithError:(NSInteger)responseCode

Parameters

ad

Ad which was viewed.

responseCode

A failure code corresponding to a constant defined in ALErrorCodes.h.

Discussion

This method will be invoked if were unable to contact AppLovin, so no ping will be heading to your server.

Declared In

ALAdRewardDelegate.h