ALAdRewardDelegate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | ALAdRewardDelegate.h |
– 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 *)responseParameters
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 *)responseParameters
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 *)responseParameters
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)responseCodeParameters
ad |
Ad which was viewed. |
|---|---|
responseCode |
A failure code corresponding to a constant defined in |
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
– userDeclinedToViewAd:
This method will be invoked if the user chooses ‘no’ when asked if they want to view a rewarded video.
- (void)userDeclinedToViewAd:(ALAd *)adParameters
ad |
Ad which was offered to the user, but declined. |
|---|
Discussion
This method will be invoked if the user chooses ‘no’ when asked if they want to view a rewarded video.
This is only possible if you have the pre-video modal enabled in the Manage Apps UI.
Declared In
ALAdRewardDelegate.h