iOS ATTrackingManager.requestTra
2021-09-26 本文已影响0人
KingWorld
上架遇到一个奇葩问题,在iOS15上没有弹出ATT弹窗
### Guideline 2.1 - Information Needed
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 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](https://help.apple.com/app-store-connect/#/dev1b4647c5b). You must have the [Account Holder or Admin role](https://developer.apple.com/support/roles/) 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](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorization) 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](https://developer.apple.com/app-store/app-privacy-details/#user-tracking).
- See Frequently Asked Questions about the [new requirements for apps that track users](https://developer.apple.com/app-store/user-privacy-and-data-use/#permission-to-track).
- Review developer documentation for [App Tracking Transparency](https://developer.apple.com/documentation/apptrackingtransparency).
解决方式:
在applicationDidBecomeActive
方法里面调用ATT授权
func applicationDidBecomeActive(_ application: UIApplication) {
if #available(iOS 14.5, *) {
ATTrackingManager.requestTrackingAuthorization { (status) in
print("status >>> \(status)")
}
}
}
如果还没弹出,检查一下,Settings > Privacy > Tracking
必须要打开Tracking,不然无法弹窗
image.pngHow to change App Tracking Transparency choices in iOS and iPadOS
Open Settings.
Select Privacy.
Select Tracking.
Tap the toggle next to the app to change whether or not it can track you.
Stop being asked about tracking
If the repeated pop-ups are getting too much for you, there's always the option to stop them from appearing at all.
How to stop the App Tracking Transparency pop-up from appearing in iOS and iPadOS
Open Settings.
Select Privacy.
Select Tracking.
Tap the toggle next to Allow Apps to Request to Tracking.
Changing this toggle will only affect whether or not you will be asked about app tracking, and won't affect any responses to the prompt that you have previously selected. Regardless of the setting for this toggle, you will be able to make changes to previous individual app choices.
Once disabled, all further apps that have yet to pose the pop-up will automatically treat the answer to the question as a denial of access to IDFA. Disabling it is a "no" by default.
There is also a possibility that a user may not have the option enabled at all. The setting may be set to off by default in the case of users with child accounts or are aged under 18, or if the Apple ID is managed by an educational institution or uses configuration profiles with limits to tracking.
Keep up with everything Apple in the weekly AppleInsider Podcast — and get a fast news update from AppleInsider Daily. Just say, "Hey, Siri," to your HomePod mini and ask for these podcasts, and our latest HomeKit Insider episode too.
Open Settings.
Select Privacy.
Select Tracking.
Tap the toggle next to the app to change whether or not it can track you.
Stop being asked about tracking