Menu

Extra Parameters

When loading ads, you can configure your ads by passing parameters into the extra dictionary. Different ad types have different configuration keys. Please refer to the table below for specific configuration key names and descriptions.

Please note that your extra dictionary values should not contain objects. Please convert them to JSON strings before adding.

1.1 Rewarded Video Ads

Key Required Value Type Description
kATAdLoadingExtraUserIDKey NSString For server-side rewards, unique user ID
kATAdLoadingExtraRewardNameKey NSString For server-side rewards, reward name
kATAdLoadingExtraRewardAmountKey NSNumber For server-side rewards, reward amount
kATRewardedVideoCallbackExtraAdsourceIDKey NSString Rewarded video ad source ID
kATRewardedVideoCallbackExtraNetworkIDKey NSString Ad platform Firm ID
kATRewardedVideoKlevinRewardTimeKey NSNumber Klevin SDK related
kATRewardedVideoKlevinRewardTriggerKey NSNumber Klevin SDK related

1.2 Native Ads

Key Required Value Type Description
kATExtraInfoNativeAdSizeKey NSValue Template-rendered native ad size, must be consistent with ATNativeAdView
kATExtraNativeImageSizeKey NSString Set native ad large image size, with the following defined values:
kATExtraNativeImageSize228_150
kATExtraNativeImageSize690_388
kATExtraNativeImageSize1280_720
kATExtraNativeImageSize1200_628
kATExtraNativeImageSize640_640
kATNativeAdSizeToFitKey BOOL Set whether to auto-fit height
kATExtraNativeIconImageSizeKey NSNumber StartApp related settings
kATExtraStartAPPNativeMainImageSizeKey NSString StartApp related settings

1.3 Splash Ads

Key Required Value Type Description
kATSplashExtraTolerateTimeoutKey NSNumber Timeout duration
kATSplashExtraAppLogoImageKey UIImage Only supported by Pangle platform, set logo image

1.4 Interstitial Ads

Key Required Value Type Description
kATInterstitialExtraAdSizeKey NSValue Set interstitial ad size
kATInterstitialExtraUsesRewardedVideo BOOL Sigmob platform, use rewarded video as interstitial
Key Required Value Type Description
kATAdLoadingExtraBannerAdSizeKey NSValue Requested ad size, please keep close to the ratio configured in the backend
kATAdLoadingExtraBannerSizeAdjustKey BOOL Used by some platforms to adjust ad size
kATAdLoadingExtraAdmobBannerSizeKey NSValue Only supported by Admob platform, adaptive banner size
kATAdLoadingExtraAdmobAdSizeFlagsKey NSNumber Only supported by Admob platform, adaptive banner size

2. Custom Parameters

You can pass custom parameters into the extra dictionary when loading ads, or set custom parameters in the ATShowConfigs instance object when displaying ads, and retrieve them in subsequent callback processes. The diagram below shows the data flow of custom parameters:

2.1 Passing Custom Data Before Loading Ads

Please use the kATAdLoadingExtraMediaExtraKey key to add, refer to the code snippet below:

objc Copy
NSMutableDictionary *extra = [@{
    kATAdLoadingExtraMediaExtraKey:@"your custom data",
} mutableCopy];

2.2 Passing Custom Data Before Displaying Ads

Requires iOS SDK >= 6.3.10

objc Copy
ATShowConfig *showConfig = ATShowConfig.new;
showConfig.showCustomExt = @"testShowCustomExt";
showConfig.scene = ...
...
Previous
Callback Delegate Parameters
Next
Q&A
Last modified: 2025-07-28Powered by