If your app participates in attribution, you should set the ATT authorization waiting. During this time interval, the SDK will wait for the user to authorize ATT and obtain the IDFA before reporting the Install event, thereby increasing attribution accuracy. If the user has not authorized within the ATT authorization waiting interval, the SDK will still report the event, but the event will not include the IDFA field.
Sample Code
SEConfig seConfig = new SEConfig();
seConfig.attAuthorizationWaitingInterval = 120; // Wait for up to 120 seconds
SolarEngine.Analytics.initSeSdk(AppKey, seConfig);Note:
This function applies to iOS only.
Note: An ATT authorization waiting period has been set. To request ATT authorization, the ATT authorization interface encapsulated by the SDK must also be used.
Warning: If the ATT authorization waiting is set and the ATT authorization interface of the SDK is not called, the installation event may be delayed by up to 120 seconds before being reported.
If the SDK's ATT authorization interface cannot be invoked
•You can call the system's ATT authorization interface first and then call the SDK's ATT authorization interface again.
•Alternatively, you can call the system's ATT authorization interface and then initialize the SDK. In this way, there is no need to set the ATT authorization wait.
This interface applies for applications involved in attribution services on iOS devices.
The SolarEngine SDK encapsulates the iOS requestTrackingAuthorizationWithCompletionHandler method. By using the ATT authorization interface, the SDK can immediately know the user's authorization status. It can prioritize reporting Install events with IDFA and optimize attribution efficiency.
The "completion" callback value status corresponds to the iOS system's ATTrackingManagerAuthorizationStatus:
0: Not Determined 1: Restricted 2: Denied 3: Authorized 999: System error
Sample Code
public static void requestTrackingAuthorizationWithCompletionHandler(SESDKATTCompletedCallback callback)
Result Example
//Call example
SolarEngine.Analytics.requestTrackingAuthorizationWithCompletionHandler(myATTCallback);
//Receive callback
private void myATTCallback(int code)
{
Debug.Log("SEUunity: myATTCallback : " + code);
}