Menu

ATSDKGlobalSetting

Copy
@class ATCustomContentInfo;
extern NSString *const kATDeviceDataInfoOSVersionNameKey; // OS version name
extern NSString *const kATDeviceDataInfoOSVersionCodeKey; // OS 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 the splash ad after clicking the jump button
    ATSplashAdClickResultTypePauseCountdown     = 2,  // Pause the countdown after clicking the jump button, resume when the splash ad is visible
};

/// Debug values used to test geographic location
typedef NS_ENUM(NSInteger, ATUMPDebugGeography) {
    ATUMPDebugGeographyDisabled = 0,  ///< Disable geographic location debugging
    ATUMPDebugGeographyEEA = 1,       ///< Debug device's geographic location appears to be within the EEA region
    ATUMPDebugGeographyNotEEA = 2,    ///< Debug device's geographic location appears to be 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 used for DirectlyAd
@property (nonatomic, strong) NSString *directlySplashAdShakeTextString;
/// Splash ad CTA button background color, only used for DirectlyAd
@property (nonatomic, strong) UIColor *directlySplashAdCTAButtonBackgroundColor;
/// Splash ad custom shake view, only used for DirectlyAd
@property (nonatomic, strong) UIView *directlySplashAdCustomShakeView;
/// Splash ad custom CTA view, only used for DirectlyAd
@property (nonatomic, strong) UIView *directlySplashAdCustomCTAView;
/// Whether the splash ad video mute icon is hidden. Not hidden by default. Only used for DirectlyAd.
@property (nonatomic, assign) BOOL directlySplashAdVideoMuteIconHidden;
/// Whether to pause the countdown after clicking the splash ad jump. Defaults to NO. Only used for TopOn 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 use
@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 a placement
/// @param customData - Custom data
/// @param placementID - Placement ID
- (void)setCustomData:(NSDictionary *)customData forPlacementID:(NSString *)placementID;

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

/// Set WeChat AppID and universal link for registering 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 the SDK to filter ads
- (void)setExludeAppleIdArray:(NSArray *)appleIdArray;

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

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

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

/// Check if a denied key is included
/// @param key - Key string
- (BOOL)isContainsForDeniedUploadInfoArray:(NSString *)key;

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

/// Set the geographic location latitude and longitude
- (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 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