MAS Knowledge Base

MAS Knowledge Base

Docy

Interstitials

1. Configure the ad events

				
					// MARK: Yodo1MasInterstitialDelegate
func onInterstitialAdLoaded(_ ad: Yodo1MasInterstitialAd) {

}

func onInterstitialAdFailed(toLoad ad: Yodo1MasInterstitialAd, withError error: Yodo1MasError) {
    
}

func onInterstitialAdOpened(_ ad: Yodo1MasInterstitialAd) {
    
}

func onInterstitialAdFailed(toOpen ad: Yodo1MasInterstitialAd, withError error: Yodo1MasError) {
    ad.loadAd()
}

func onInterstitialAdClosed(_ ad: Yodo1MasInterstitialAd) {
    ad.loadAd()
}
				
			
				
					#pragma mark - Yodo1MasInterstitialDelegate
- (void)onInterstitialAdLoaded:(Yodo1MasInterstitialAd *)ad {
   
}

- (void)onInterstitialAdFailedToLoad:(Yodo1MasInterstitialAd *)ad withError:(Yodo1MasError *)error {
    
}

- (void)onInterstitialAdOpened:(Yodo1MasInterstitialAd *)ad {
    
}

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

- (void)onInterstitialAdClosed:(Yodo1MasInterstitialAd *)ad {
    [ad loadAd];
}

				
			

2. Instantiate

				
					Yodo1MasInterstitialAd.sharedInstance()
				
			
				
					[Yodo1MasInterstitialAd sharedInstance];
				
			

3. Load the ad

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

4. Show the ad

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