被拒理由:
Guideline 2.1 - Information Needed
We're still 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 15.0.Since you indicated in App Store Connect that you collect data in
order to track the user, we need to confirm that App Tracking
Transparency has been correctly implemented.Next Steps
Please explain where we can find the App Tracking Transparency
permission request in your app. The request should appear before any
data is collected that could be used to track the user.If your app does not track users, please update your app privacy
information in App Store Connect. You must have the Account Holder or
Admin role to update app privacy information.If you've implemented App Tracking Transparency but the permission
request is not appearing on devices running the latest OS, please
review the available documentation and confirm App Tracking
Transparency has been correctly implemented.Resources
- Tracking is linking data collected from your app with third-party data for advertising purposes, or sharing the collected data with a
data broker. Learn more about tracking.- See Frequently Asked Questions about the new requirements for apps that track users.
- Review developer documentation for App Tracking Transparency.
意思是:您的应用程序使用AppTrackingTransparency框架,但在iOS 15.0上查看时,我们无法找到应用程序跟踪透明度权限请求。
但是我已经适配了呀
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
}];
} else {
// Fallback on earlier versions
}
看被拒的原因是:没有在iOS15系统上弹出。
经过在模拟器上运行,果然iOS15没有弹出提示。
解决方案:
之前是把att的代码放在了
//当程序载入后执行
-(void)applicationDidFinishLaunching:(UIApplication *)application{
NSLog(@"当程序载入后执行");
}
现在改为放在
//APP已经进入前台
- (void)applicationDidBecomeActive:(UIApplication *)application{
NSLog(@"应用程序已进入前台,处于活动状态");
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
}];
} else {
// Fallback on earlier versions
}
}
弹框果然就出现了!问题等到解决。
问题原因分析:
可能是苹果修改了调用时机,太早执行可能还没有被初始化,导致调用无效。