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
- (void)requestTrackingAuthorizationWithCompletionHandler:(void (^)(NSUInteger status))completion;
Sample Code
[[SolarEngineSDK sharedInstance] requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) {
switch (status) {
case 0:
NSLog(@"NotDetermined");
// ATTrackingManagerAuthorizationStatusNotDetermined case
break;
case 1:
NSLog(@"Restricted");
// ATTrackingManagerAuthorizationStatusRestricted case
break;
case 2:
NSLog(@"Denied");
// ATTrackingManagerAuthorizationStatusDenied case
break;
case 3:
NSLog(@"Authorized");
// ATTrackingManagerAuthorizationStatusAuthorized case
break;
case 999:
NSLog(@"systom error");
break;
}
}];