Menu

ATSDKGlobalSetting

General settings class, providing features such as clearing in-memory ad caches, custom traffic group settings, test mode, configuring third-party ad SDK information, etc. It also declares some common properties.

Copy
@class ATCustomContentInfo;
extern NSString *const kATDeviceDataInfoOSVersionNameKey; // System version name
extern NSString *const kATDeviceDataInfoOSVersionCodeKey; // System version code
extern NSString *const kATDeviceDataInfoPackageNameKey; // App package name
extern NSString *const kATDeviceDataInfoAppVersionNameKey; // App version name
extern NSString *const kATDeviceDataInfoAppVersionCodeKey; // App version code
extern NSString *const kATDeviceDataInfoBrandKey; // Phone brand
extern NSString *const kATDeviceDataInfoModelKey; // Phone model
extern NSString *const kATDeviceDataInfoScreenKey; // Screen resolution
extern NSString *const kATDeviceDataInfoNetworkTypeKey; // Network type
extern NSString *const kATDeviceDataInfoMNCKey; // Mobile Network Code
extern NSString *const kATDeviceDataInfoMCCKey; // Mobile Country Code
extern NSString *const kATDeviceDataInfoLanguageKey; // Language
extern NSString *const kATDeviceDataInfoTimeZoneKey; // Time zone
extern NSString *const kATDeviceDataInfoUserAgentKey; // User Agent
extern NSString *const kATDeviceDataInfoOrientKey; // Screen orientation
extern NSString *const kATDeviceDataInfoIDFAKey; // IDFA
extern NSString *const kATDeviceDataInfoIDFVKey; // IDFV

typedef NS_ENUM(NSUInteger, ATSplashAdClickResultType) {
    ATSplashAdClickResultTypeDidCloseAd         = 1,  // Close Splash Ad after clicking the redirect button
    ATSplashAdClickResultTypePauseCountdown     = 2,  // Pause countdown after clicking the redirect button, resume countdown while the Splash Ad is visible
};

/// Debug value used to test geographic location
typedef NS_ENUM(NSInteger, ATUMPDebugGeography) {
    ATUMPDebugGeographyDisabled = 0,  ///< Disable geographic location debugging
    ATUMPDebugGeographyEEA = 1,       ///< The debug device's geographic location is displayed as within the EEA region
    ATUMPDebugGeographyNotEEA = 2,    ///< The debug device's geographic location is displayed as outside the EEA region
};

typedef NS_ENUM(NSInteger, ATSystemPlatformType) {
    ATSystemPlatformTypeUnknown = 0,
    ATSystemPlatformTypeIOS = 1,
    ATSystemPlatformTypeUnity = 2,
    ATSystemPlatformTypeCocos2dx = 3,
    ATSystemPlatformTypeCocosCreator = 4,
    ATSystemPlatformTypeReactNative = 5,
    ATSystemPlatformTypeFlutter = 6,
    ATSystemPlatformTypeAdobeAir = 7
};

@interface ATSDKGlobalSetting : NSObject

+ (instancetype)sharedManager;

/*
 channel and customData must be set before Initialization
 */
@property (nonatomic, strong) NSString *channel;
@property (nonatomic, strong) NSString *subchannel;
@property (nonatomic, strong) NSDictionary *customData;
/// Splash Ad shake text string, only for DirectlyAd
@property (nonatomic, strong) NSString *directlySplashAdShakeTextString;
/// Splash Ad CTA button background color, only for DirectlyAd
@property (nonatomic, strong) UIColor *directlySplashAdCTAButtonBackgroundColor;
/// Splash Ad custom shake view, only for DirectlyAd
@property (nonatomic, strong) UIView *directlySplashAdCustomShakeView;
/// Splash Ad custom CTA view, only for DirectlyAd
@property (nonatomic, strong) UIView *directlySplashAdCustomCTAView;
/// Whether the Splash Ad video mute icon is hidden, default is not hidden, only for DirectlyAd
@property (nonatomic, assign) BOOL directlySplashAdVideoMuteIconHidden;
/// Whether to pause the countdown after clicking the Splash Ad to redirect, default is NO, only for Taku ADX, DirectlyAd, and Cross Promotion
@property (nonatomic, assign) ATSplashAdClickResultType splashAdClickResultType;

// UMP test device IDs
@property (nonatomic, nullable,strong) NSArray<NSString *> *umpTestDeviceIdentifiers;
/// Debug geographic location
@property (nonatomic, assign) ATUMPDebugGeography umpGeography;
/// Set Header Bidding test mode, only supports passing the device IDFA
/// setLogEnabled must be enabled before using this
@property (nonatomic, strong) NSString *headerBiddingTestModeDeviceID;
/// System platform info
@property (nonatomic, assign) ATSystemPlatformType systemPlatformType;

@property (nonatomic, strong) ATSharePlacementConfig *sharePlacementConfig;
/// Set whether WeChat is installed
@property (nonatomic, assign) BOOL isInstallWX;
/// Used for setLocationLongitude:dimension:
@property (nonatomic, readonly) NSDictionary *locationDictionary;

/// Set custom data for an Ad Placement
/// @param customData - Custom data
/// @param placementID - Ad Placement ID
- (void)setCustomData:(NSDictionary *)customData forPlacementID:(NSString *)placementID;

/// Get custom data
- (NSDictionary *)customDataForPlacementID:(NSString *)placementID;

/// Set WeChat AppID and universal link, used to register the WeChat Open SDK
/// @param appID - WeChat AppID
/// @param universalLink - WeChat universal link
- (void)setWeChatAppID:(NSString *)appID universalLink:(NSString *)universalLink;

- (void)addCustomAdapterConfigArray:(NSArray <ATCustomNetworkMode *>*)array;

/// Set the list of Apple IDs for SDK filtered ads
- (void)setExludeAppleIdArray:(NSArray *)appleIdArray;

/// Get the list of filtered Apple IDs
- (NSArray *)exludeAppleIdArray;

/// Set the list of denied upload information for SDK-controlled reporting
- (void)setDeniedUploadInfoArray:(NSArray *)uploadInfoArray;

/// Get the list of denied upload information
- (NSArray *)deniedUploadInfoArray;

/// Check whether the denied key is included
/// @param key - key string
- (BOOL)isContainsForDeniedUploadInfoArray:(NSString *)key;

- (void)setPresetPlacementConfigPathBundle:(NSBundle *)bundle;

/// Set geographic location longitude and latitude
- (void)setLocationLongitude:(double)longitude dimension:(double)dimension;

- (void)setDebuggerConfig:(void(^_Nullable)(ATDebuggerConfig * _Nullable debuggerConfig))debuggerConfigBlock;

- (void)setDeviceInfoConfig:(void(^_Nullable)(ATDeviceInfoConfig * _Nullable deviceInfoConfig))deviceInfoConfigBlock;

/// Remove all cached ads for the specified Ad Placement
- (void)removeAllCacheWithPlacementId:(NSString *)placementId;
- (void)removeAllCacheWithPlacementId:(NSString *)placementId index:(NSInteger)index;

- (ATCustomContentInfo *)customContentReviewResult:(NSArray<ATCustomContentInfo *> *)infos;
@end
Previous
ATRewardedVideoCustomEvent
Next
ATSplashCustomEvent
Last modified: 2026-07-08Powered by