The General Data Protection Regulation (GDPR) issued by the European Union came into effect on May 25, 2018. To support the GDPR protocol, we have updated our privacy policy. Please refer to the relevant content of the Privacy Policy on our official website. At the same time, to safeguard the security of user data privacy, the TopOn iOS SDK has added data protection features. Please refer to the following content to learn how to configure it.

- Presented using the present method; please do not present your own window at this time.
- If the ViewController parameter is not passed, it will automatically be obtained and displayed by default.
- Before using the following code, you must remove the ATT request code from other locations. Please do not use it in
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions, because Apple requires the ATT request to be called afterapplicationDidBecomeActive.
The above integration sample code is as follows:
// Import header file
#import <AnyThinkSDK/ATAPI.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
- (void)initFlow {
[[ATAPI sharedInstance] showGDPRConsentDialogInViewController:[UIApplication sharedApplication].keyWindow.rootViewController dismissalCallback:^{
// This example requests ATT permission on a non-first launch when the user has consented or the data consent is unknown. You can adjust it based on the actual app situation.
if (([ATAPI sharedInstance].dataConsentSet == ATDataConsentSetUnknown && ([[NSUserDefaults standardUserDefaults] boolForKey:@"GDPR_First_Flag"] == YES))
|| [ATAPI sharedInstance].dataConsentSet == ATDataConsentSetPersonalized) {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
}];
}
}
// Initialize the SDK
[[ATAPI sharedInstance] startWithAppID:kTakuAppID appKey:kTakuAppKey error:nil];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"GDPR_First_Flag"];
}];
//......Other code
}
After the user makes their selection, use the following method to set the GDPR level for TopOn. The consentString parameter is reserved for Flurry. We provide three levels of data protection:
typedef NS_ENUM(NSInteger, ATDataConsentSet) {
/*
This is the default value, used when the developer has not set it. In this case, if the user is in the GDPR region, SDK initialization will fail,
and subsequent ad requests will also fail. This type cannot be set using the setDataConsentSet method.
*/
ATDataConsentSetUnknown = 0,
/*
This level indicates that the user consents to the SDK collecting and using their personal data to provide more relevant and suitable ads for them.
*/
ATDataConsentSetPersonalized = 1,
/*
If the data protection level is set to this value, the SDK will not collect the user's personal data, as the ads served may not match the user's situation.
Additionally, in this case, certain data that does not involve user privacy may still be collected.
*/
ATDataConsentSetNonpersonalized = 2
};
// After the user has made their selection according to your logic, you can call the following API to set it
[[ATAPI sharedInstance] setDataConsentSet:ATDataConsentSetUnknown consentString:[NSDictionary dictionary]];
The California Consumer Privacy Act (CCPA) provides various privacy rights to California consumers. Businesses subject to CCPA will fulfill multiple obligations to these consumers, including information disclosure, consumer rights similar to the EU General Data Protection Regulation (GDPR), the right to "opt out" of specific data transfers, and the "opt-in" requirement for minors.
Please go to the TopOn Dashboard - App page, then click the "Edit" button to configure CCPA, as shown below:

The Children's Online Privacy Protection Act (COPPA) primarily regulates the online collection of personal information from children under 13 years of age. According to the FTC's Complying with COPPA: Frequently Asked Questions, developers are responsible for determining whether their app is directed to children under 13, taking into account factors including but not limited to: "the subject matter of the site or service, its visual content, the use of animated characters or child-oriented activities and incentives, music or other audio content, age of models, presence of child celebrities or celebrities who appeal to children, language of the Web site or online service or other characteristics, and whether advertising promoting or appearing on the Web site or online service is directed to children."
⚠️ IMPORTANT : Child Traffic Classification Rules (Both conditions must be met simultaneously):
- TopOn SDK enforces child privacy protection restrictions on corresponding ad requests in accordance with COPPA requirements only when both of the following conditions are met:
- Dashboard Configuration: The COPPA status of the application is set to "Yes" in the TopOn Dashboard.
- Code Implementation: Prior to SDK initialization, the developer explicitly marks the user as a child ("Yes") via the appropriate API (indicating that the user is under 13 years of age; see sample code in Step 2. Pass the Child Flag Prior to SDK Initialization).
- Developers must accurately configure the COPPA status and child flag based on app properties and actual user circumstances. The absence of a child flag does not automatically mean the traffic is exempt from child traffic classification; developers remain responsible for ensuring their setup complies with applicable legal requirements.
Go to the TopOn Dashboard - Apps page, locate the target application, click the Edit button, and set the COPPA option to "Yes".

Note: If set to "No", all traffic from this application will be globally treated as non-child traffic, and any child flags passed in Step 2 will no longer trigger COPPA restrictions.
// Accurately set the child flag based on app properties and actual user circumstances
// [ATSDKGlobalSetting sharedManager].customData = @{kATCustomDataAgeKey:@"10"}; // Child traffic flag
// [ATSDKGlobalSetting sharedManager].customData = @{kATCustomDataAgeKey:@"100"}; // Non-child traffic flag
⚠️ Note
- Pangle removed COPPA and CCPA settings starting from v7.1.x.x, unifying them under PAConsent
- TopOn SDK supports the use of PAConsent in v6.4.88 and above
- If not set as follows, the Pangle SDK default value
Consentwill be used- It is recommended to set this before TopOn SDK initialization
//同意
[ATPangleConfigure setPAGPAConsentType:ATPAGPAConsentTypeConsent];
//不同意
[ATPangleConfigure setPAGPAConsentType:ATPAGPAConsentTypeNoConsent];