iOS Rewarded Video Integration

In order to integrate the Rewarded Video ads, you need to use the Yodo1MasRewardAdDelegate delegate.

1. Set Up Rewarded Video Ad Delegate Methods

For Swift

Yodo1Mas.sharedInstance().rewardAdDelegate = self

func onAdOpened(_ event: Yodo1MasAdEvent) {
           
}
    
func onAdClosed(_ event: Yodo1MasAdEvent) {
        
}
    
func onAdError(_ event: Yodo1MasAdEvent, _ error: Yodo1MasError) {

}

func onAdRewardEarned(_ event: Yodo1MasAdEvent) {
        
}

For Objective C

[Yodo1Mas sharedInstance].rewardAdDelegate = self;

#pragma mark - Yodo1MasAdDelegate
- (void)onAdOpened:(Yodo1MasAdEvent *)event {
    
}

- (void)onAdClosed:(Yodo1MasAdEvent *)event {
    
}

- (void)onAdError:(Yodo1MasAdEvent *)event error:(Yodo1MasError *)error {
    
}

#pragma mark - Ad Rewarded
- (void)onAdRewardEarned:(Yodo1MasAdEvent *)event {
    
}


2. Check the Loading Status of Rewarded Video Ads

For Swift

let isLoaded = Yodo1Mas.sharedInstance().isRewardAdLoaded()

For Objective C

BOOL isLoaded = [[Yodo1Mas sharedInstance] isRewardAdLoaded];


3. Show Rewarded Video Ads

For Swift

Yodo1Mas.sharedInstance().showRewardAd()

For Objective C

[[Yodo1Mas sharedInstance] showRewardAd]

Updated on July 21, 2021

Was this article helpful?

Related Articles