Advanced guide
1. Initialization parameters
The TDSettings configuration passed in during initialization is described below:
1.1 TDSettings
| Property name | Type | Description |
|---|---|---|
| appId | NSString | app id of the project created in the AE backend |
| serverUrl | NSString | server url of the project created in the AE backend |
| mode | TDSDKMode | Enum of SDK running modes |
| enableLog | BOOL | Whether to enable log printing |
| rccFetchParams | NSDictionary | (Used by TDRemoteConfig) Custom request parameters for fetching configurations |
| encryptVersion | NSInteger | (Used by ThinkingSDK) Key version number when data encryption is enabled |
| encryptKey | NSString | (Used by ThinkingSDK) Public key information when data encryption is enabled |
| defaultTimeZone | NSTimeZone | (Used by ThinkingSDK) Time zone that the SDK uses to format time |
| instanceName | NSString | (Used by ThinkingSDK) Sets an alias for the data collection SDK instance |
| enableAutoPush | BOOL | (Used by ThinkingSDK) Whether to enable automatic collection of push clicks |
| enableAutoCalibrated | BOOL | (Used by ThinkingSDK) Whether to enable automatic time calibration |
1.2 TDSDKMode
| Enum values | Description |
|---|---|
| TDSDKModeNomal | Reports data normally, and the data is ingested. |
TDSDKModeDebug | Reports collected data in Debug mode. The device id must be added to the test device list in the AE console. You can view the data collected in real time under AE console -> Debugger. Reported data is stored in the AE system. |
TDSDKModeDebugOnly | Reports collected data in DebugOnly mode. The device id must be added to the test device list in the AE console. You can view the data collected in real time under AE console -> Debugger. Reported data is not stored in the AE system. |
2. Customize fetch timing
2.1 Automatic fetching
The SDK automatically fetches remote configuration data in the following scenarios
- App cold start
- App foreground/background switch, more than 6 hours after the previous one
- The ThinkingSDK account system changes, for example, on login or logout
2.2 Manual fetching
Call the SDK method manually to fetch remote configuration at any time
[TDRemoteConfig fetch];
This API has internal rate limiting. Avoid fetching too frequently.
3. Custom Fetch parameters
Fetch parameters are parameters that the client SDK can use when it requests values from the AE server. You can customize Fetch parameters and add them as Environment Parameters of config channels. You can then use the Fetch parameters to customize the target environment when you configure strategies.
3.1 Add
[TDRemoteConfig setCustomFetchParams:@{}];
3.2 Delete
Delete by the specified key
[TDRemoteConfig removeCustomFetchParam:@"key"];

