The application developer must respect and protect the personal information of end users and cannot illegally collect or use it when the application developer provides network services based on the laws, regulations, and regulatory requirements, including Personal Information Protection Law, Data Security Law, and Cybersecurity Law. This guide is intended to help developers protect personal information and prevent any infringement on the personal information rights of end users.
1. System permissions
Permission | Required | Purpose |
INTERNET | Yes | This permission allows the SDK to connect to the Internet for domain name resolution in the could. This is the basic permission for network connection. |
2. Features and required personal information
Feature | Collected personal information field | Purpose | Configuration |
N/A | N/A | N/A | N/A |
3. Optional personal information fields and configuration
Optional personal information field | Purpose | Configuration |
N/A | N/A | N/A |
4. Compliant SDK initialization solution
- (instancetype)initWithAccountID:(int)accountID;
/*!
* @brief Enable the initialization API of the authentication feature.
* @details Initialize the SDK, enable the authentication feature, and specify the HTTPDNS account ID and the secret that are required for the authentication feature.
* You can obtain your account ID and secret from the HTTPDNS console.
* You can call this method to initialize a single instance.
* @param accountId: The HTTPDNS account ID.
* @param secretKey: The secret that is required for authentication.
*/
- (instancetype)initWithAccountID:(int)accountID secretKey:(NSString *)secretKey;Make sure that users agree to the privacy policy before HTTPDNS SDK for iOS is initialized and called.
Sample code
// Initialize the authentication feature.
HttpDnsService *httpdns = [[HttpDnsService alloc] initWithAccountID:accountId secretKey:secretKey];
// Specify whether to return the IP addresses in expired DNS records of a domain name.
[httpdns setReuseExpiredIPEnabled:YES];
// Specify whether to enable the persistent cache feature.
[httpdns setPersistentCacheIPEnabled:YES];
//Specify whether to allow HTTPS requests.
[httpdns setHTTPSRequestEnabled:YES];
// Specify whether to enable the automatic refresh feature when the network type is changed.
[httpdns setPreResolveAfterNetworkChanged:YES];
// Specify whether to enable HTTPDNS SDK logs. We recommend that you disable HTTPDNS SDK logs in the production environment.
[httpdns setLogEnabled:YES];