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.
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 |
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 |
Key | Required Value Type | Description |
---|---|---|
kATSplashExtraTolerateTimeoutKey | NSNumber | Timeout duration |
kATSplashExtraAppLogoImageKey | UIImage | Only supported by Pangle platform, set logo image |
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 |
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:
Please use the kATAdLoadingExtraMediaExtraKey key to add, refer to the code snippet below:
NSMutableDictionary *extra = [@{
kATAdLoadingExtraMediaExtraKey:@"your custom data",
} mutableCopy];
Requires iOS SDK >= 6.3.10
ATShowConfig *showConfig = ATShowConfig.new;
showConfig.showCustomExt = @"testShowCustomExt";
showConfig.scene = ...
...