MAS Knowledge Base

MAS Knowledge Base

Docy

Rewarded Ads

1. Configure the ad events

				
					// MARK: Yodo1MasRewardDelegate
func onRewardAdLoaded(_ ad: Yodo1MasRewardAd) {

}

func onRewardAdFailedtoLoad(_ ad: Yodo1MasRewardAd, withError error: Yodo1MasError) {
    
}

func onRewardAdOpened(_ ad: Yodo1MasRewardAd) {
    
}

func onRewardAdFailedtoOpen(_ ad: Yodo1MasRewardAd, withError error: Yodo1MasError) {
    ad.loadAd();
}

func onRewardAdClosed(_ ad: Yodo1MasRewardAd) {
    ad.loadAd();
}

func onRewardAdEarned(_ ad: Yodo1MasRewardAd) {
    
}
				
			
				
					#pragma mark - Yodo1MasRewardDelegate
- (void)onRewardAdLoaded:(Yodo1MasRewardAd *)ad {

}

- (void)onRewardAdFailedToLoad:(Yodo1MasRewardAd *)ad withError:(Yodo1MasError *)error {
    
}

- (void)onRewardAdOpened:(Yodo1MasRewardAd *)ad {
    
}

- (void)onRewardAdFailedToOpen:(Yodo1MasRewardAd *)ad withError:(Yodo1MasError *)error {
    [ad loadAd];
}

- (void)onRewardAdClosed:(Yodo1MasRewardAd *)ad {
    [ad loadAd];
}

- (void)onRewardAdEarned:(Yodo1MasRewardAd *)ad {
    
}
				
			

2. Instantiate

				
					Yodo1MasRewardAd.sharedInstance()
				
			
				
					[Yodo1MasRewardAd sharedInstance];
				
			

3. Load the ad

				
					Yodo1MasRewardAd.sharedInstance().loadAd()
				
			
				
					[[Yodo1MasRewardAd sharedInstance] loadAd];
				
			

4. Show the ad

				
					Yodo1MasRewardAd.sharedInstance().showAd(withPlacement: "Your Placement")
				
			
				
					[[Yodo1MasRewardAd sharedInstance] showAdWithPlacement:@"Your Placement"];
				
			
CONTENTS