We're looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 16.4.1.
把 IDFA 的代码写到这里就可以了!
- (void)applicationDidBecomeActive:(UIApplication *)application {
ASIdentifierManager *manager = [ASIdentifierManager sharedManager];
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
idfa = [[manager advertisingIdentifier] UUIDString];
}
}];
}else{
if ([manager isAdvertisingTrackingEnabled]) {
idfa = [[manager advertisingIdentifier] UUIDString];
}
}
}
网友评论