Implementing rewarded ads in iOS
Rewarding players for watching ads increases user engagement, resulting in higher revenue. For example, games might reward users with in-game currency, consumables, additional lives, or experience-multipliers. For more information on how to effectively design your rewarded ads, refer to the monetization strategy guide.
To reward users for completing a video ad, ensure that the Ad Unit ID used in your show
method matches the rewarded Ad Unit ID:
- (IBAction)showRewardedAd:(UIButton *)sender {
[UnityAds show:self placementId:@"Rewarded_iOS" showDelegate:self];
}
Then implement your reward functionality in the unityAdsShowComplete
callback method:
#pragma mark: UnityAdsShowDelegate
- (void)unityAdsShowComplete:(NSString *)placementId withFinishState:(UnityAdsShowCompletionState)state {
NSLog(@" - UnityAdsShowDelegate unityAdsShowComplete %@ %ld", placementId, state);
if ([placementId isEqualToString:@"Rewarded_iOS"] && state == kUnityShowCompletionStateCompleted) {
// Reward the user.
}
}
Next steps: To expand your implementation, refer to Implementing banner ads in iOS.