Menu

Interstitial video ads

1. Integration Suggestions

1.1 Ad Loading

  • The Auto Load API only needs to be called once for the same placement ID.
  • You do not need to call the loadADWithPlacementID: method of ATAdManager to load the ad.

1.2 Ad Display

  • Please avoid displaying ads in the (didFinishLoadingADWithPlacementID:) callback, as this will cause a load-display loop.
  • Before displaying, the app must be in an active state (UIApplicationState==UIApplicationStateActive).

2. Enable Auto Load

Copy
// Import header file
#import 

/// Set up Auto Load Interstitial ad
/// - Parameter placementID: Placement ID
- (void)loadInterstitialADWithPlacementID:(NSString *)placementID {
    // Set delegate
    [ATInterstitialAutoAdManager sharedInstance].delegate = self;
    // Set LocalExtra custom parameters, which will be returned in the delegate's Extra and can be used for custom rule matching for this placement. Parameters can be referenced.
    [[ATInterstitialAutoAdManager sharedInstance] setLocalExtra:@{} placementID:placementID];
    // Start automatically loading ads
    [[ATInterstitialAutoAdManager sharedInstance] addAutoLoadAdPlacementIDArray:@[placementID]];
}

If you need to display ads in the load success callback (didFinishLoadingADWithPlacementID:), to avoid the ad failing to display properly, please ensure that the current app is in an active state (UIApplicationState==UIApplicationStateActive).

Copy
/// Display ad
/// - Parameters:
///   - placementID: Placement ID
- (void)showInterstitialADWithPlacementID:(NSString *)placementID {
    // Check if the ad is ready before displaying
    BOOL isReady = [[ATInterstitialAutoAdManager sharedInstance] autoLoadInterstitialReadyForPlacementID:placementID];
    if (isReady) {
       [[ATInterstitialAutoAdManager sharedInstance] showAutoLoadInterstitialWithPlacementID:placementID inViewController:self delegate:self];
    }
}

4. API Description

Class Name / File Name Introduction
ATAdManager The base operation class for ads, including features such as ad loading, filtering ads, and scenario statistics.
ATInterstitialAutoAdManager The management class for Auto Load Interstitial ads, providing features such as enabling Auto Load, removing Auto Load, setting local parameters, checking ready status, displaying ads, and scenario statistics.
ATAdLoadingDelegate The base delegate callback declaration for ads, including placement-level and ad source-level load success or failure callbacks, as well as bidding completion and bidding failure callbacks for bidding ad sources.
ATInterstitialDelegate Delegate callbacks specific to the Interstitial ad type, including display, click, dismiss, etc.
ATSDKGlobalSetting A general settings class, providing features such as clearing ad memory caches, custom traffic group settings, test mode, setting third-party ad SDK related information, etc. It also declares some general properties.
Previous
Rewarded video ads
Next
Third-party revenue feedback(SDK v6.4.12 or above)
Last modified: 2026-07-08Powered by