Rewarded Video | iOS

Similar to interstitial video ad units, rewarded video ads are shown in fullscreen mode.

Integrate a rewarded video ad using the SOMARewardedVideo class.

// Step 1: Instantiate and start loading
SOMARewardedVideo* adview = [[SOMARewardedVideo alloc] init];
adView.delegate = self;
[adView load];

// Step 2:  Present the ad once loaded in the following SOMAAdViewDelegate method:
- (void)somaAdViewDidLoadAd:(SOMAAdView*)adview{
if(adview.isLoaded) {
[adview show]; /* Before showing an ad, we recomment you to check if the ad is in loaded state using adView.isLoaded property. */

You can track different events such as video started, 25%, 50%, 75%, and 100% completion for rewarded video using didReceiveVideoAdEvent delegate as described below:

- (void)somaAdView:(SOMAAdView *)adview didReceiveVideoAdEvent:(SOMAVideoAdTrackingEvent)event {
   if (event == SOMAVideoAdTrackingEventStart) {
       NSLog(@"Video Ad Started");
   } else if (event == SOMAVideoAdTrackingEventFirstQuartile) {
       NSLog(@"Video Ad reached first quartile");
   } else if (event == SOMAVideoAdTrackingEventMidpoint) {
       NSLog(@"Video Ad reached mid point");
   } else if (event == SOMAVideoAdTrackingEventThirdQuartile) {
       NSLog(@"Video Ad reached third quartile");
   } else if (event == SOMAVideoAdTrackingEventComplete) {
       NSLog(@"Video Ad Completed");

Auto-Close Feature

Unlike VAST/interstitial video ads, rewarded video ads do not have skip functionality. If skip durations are set in the code, the SDK will ignore the setting for rewarded video ads.

Last Modified: February 20, 2020 at 3:16 pm

© 2005-2020 Smaato, Inc. All Rights Reserved. Smaato® is a registered trademark of Smaato, Inc.

Privacy Policy | Cookie Policy | Support