We constantly publish updates to our documentation, which may not yet be available in your language. For the most current information, use the English version.
Adjust.requestTrackingAuthorizationWithCompletionHandler((status) =>
{
switch (status)
{
case 0:
// ATTrackingManagerAuthorizationStatusNotDetermined case
break;
case 1:
// ATTrackingManagerAuthorizationStatusRestricted case
break;
case 2:
// ATTrackingManagerAuthorizationStatusDenied case
break;
case 3:
// ATTrackingManagerAuthorizationStatusAuthorized case
break;
}
});
示例
在此示例中,当用户与弹窗交互时,我们记录了一个人类可读的用户授权状态描述。
C#
Adjust.requestTrackingAuthorizationWithCompletionHandler((status) =>
{
switch (status)
{
case 0:
Debug.Log("The user has not responded to the access prompt yet.");
break;
case 1:
Debug.Log("Access to app-related data is blocked at the device level.");
break;
case 2:
Debug.Log("The user has denied access to app-related data for device tracking.");
break;
case 3:
Debug.Log("The user has approved access to app-related data for device tracking.");
break;
}
});