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(function(status) {
switch (status) {
case 0:
// ATTrackingManagerAuthorizationStatusNotDetermined case
break;
case 1:
// ATTrackingManagerAuthorizationStatusRestricted case
break;
case 2:
// ATTrackingManagerAuthorizationStatusDenied case
break;
case 3:
// ATTrackingManagerAuthorizationStatusAuthorized case
break;
}
});
示例
在此示例中,当用户与弹窗交互时,我们记录了一个人类可读的用户授权状态描述。
Javascript
Adjust.requestTrackingAuthorizationWithCompletionHandler(function(status) {
switch (status) {
case 0:
console.log("Theuser has not responded to the access prompt yet.");
break;
case 1:
console.log("Access to app-related data is blocked at the device level.");
break;
case 2:
console.log("Theuser has denied access to app-related data for device tracking.");
break;
case 3:
console.log("Theuser has approved access to app-related data for device tracking.");
break;
}
});