Search...
Menu

Splash Ads

💡Tips

  • To optimize loading efficiency, implement Preset Strategy
  • Configure ad load timeout (recommended 6s - 10s) based on business requirements
  • Timeout duration applies only to ad loading phase, not including display time
  • ⚠️ Excessively short timeouts may degrade ad performance
  • ⚠️ When Price Priority Mode is enabled in HyperBid Tools Dashboard > Application > Edit Mediation Unit > Advanced Settings, its callback timeout overrides fetchTimeout
  • 🎯 Supports custom bottom logo view

objective-c Copy
@interface SplashVC () <MCAdDelegate, MCAdRevenueDelegate>

@property (nonatomic, strong) MCAppOpenAd *appOpenAd; 

@end

@implementation SplashVC

#define SplashPlacementID @"your mediation unit id"

//Scene ID
#define SplashSceneID @""

//fetchTimeout, unit: seconds
#define Splash_Timeout 8

#pragma mark - Load Ad
- (void)loadAd {
    if (!self.appOpenAd) {
        self.appOpenAd = [[MCAppOpenAd alloc] initWithPlacementId:SplashPlacementID containerView:containerView];
    }
    self.appOpenAd.delegate = self;
    self.appOpenAd.revenueDelegate = self;
    
    [self.appOpenAd setLoadAdTimeout:Splash_Timeout];
    [self.appOpenAd loadAd];
}

#pragma mark - MCAdDelegate
// Ad load success
- (void)didLoadAd:(MCAdInfo *)ad {
 
}

// Loading timeout
- (void)didLoadAdTimeout {
    
}

// Ad load failure
- (void)didFailToLoadAdWithError:(MCError *)error {
    
}

// Ad display success
- (void)didDisplayAd:(MCAdInfo *)ad {

}

// Ad closed
- (void)didHideAd:(MCAdInfo *)ad { 
    // soft launch pre-load
    // [self.appOpenAd loadAd];
}

// Ad click
- (void)didClickAd:(MCAdInfo *)ad {

}

// Ad display failure
- (void)didFailToDisplayAd:(MCAdInfo *)ad withError:(MCError *)error { 
    // soft launch pre-load
    // [self.appOpenAd loadAd];
}

- (void)didAdVideoStarted:(MCAdInfo *)ad { }

- (void)didAdVideoCompleted:(MCAdInfo *)ad { }

#pragma mark - MCAdRevenueDelegate
// Revenue tracking
- (void)didPayRevenueForAd:(MCAdInfo *)ad {

}

objective-c Copy
if ([self.appOpenAd isReady]) {
    [self.appOpenAd showAdWithWindow:[UIApplication sharedApplication].keyWindow viewController:self withExtra:@{kMCAPIPlacementScenarioIDKey:@"your scene id"}];
} else {
    [self.appOpenAd loadAd];
}

3. Resource Release

objective-c Copy
[self.appOpenAd destroyAd]; 

4. Customized Parameter Configuration

objective-c Copy
- (void)loadAd {
    MCAppOpenAd *appOpenAd = [[MCAppOpenAd alloc] initWithPlacementId:self.placementID];
    appOpenAd.delegate = self;
    appOpenAd.revenueDelegate = self;
    
    [appOpenAd setLoadExtraParameter:@{
        @"userData": @"test_userData"
    }];
    
    [appOpenAd setExtraParameter:@{
        @"test_extra_key": @"test_extra_value"
    }];
    
    [appOpenAd loadAd];
    self.appOpenAd = appOpenAd;
}

- (void)didLoadAd:(MCAdInfo *)ad {
    // Retrieve customized parameters
    NSString *originDataJsonString = ad.originData;
}    
Previous
Interstitial Ads
Next
Native Ads
Last modified: 2025-06-26Powered by