iOS Swift中设置App Tracking Transparency默认状态为.denied及隐藏特定App ATT弹窗的可行性咨询
Hey there! Let's tackle your questions about App Tracking Transparency (ATT) in iOS Swift development one by one:
.denied? Nope, you can't. The initial default status of ATTrackingManager.trackingAuthorizationStatus is always .notDetermined—this is controlled entirely by the iOS system, not your app. The status only changes when the user explicitly allows/denies tracking via the ATT popup, or if they've disabled tracking globally in their device settings. There's no API or workaround to force the default state to .denied at the app level.
.denied Let's break this into two parts:
Hiding the ATT popup for this specific app
This is totally feasible, and actually the correct approach if your app truly doesn't use IDFA (including no third-party SDKs that collect or use IDFA). The ATT popup only appears when you callATTrackingManager.requestTrackingAuthorization()in your code. So for this app, simply don't call this method at all—the popup will never show up. For your other apps that need tracking, keep calling the method as usual, and the popup will display normally.Can you force the tracking status to
.deniedpermanently via code?
No, this isn't allowed or possible. ThetrackingAuthorizationStatusproperty is read-only—you can only check its value, not modify it directly. Apple strictly prohibits apps from tampering with this status, as it violates user privacy controls. Trying to hack or work around this would likely result in your app being rejected during App Store review.
A key professional note:
Make 100% sure your app (and all integrated SDKs) don't use IDFA. Some SDKs enable IDFA collection by default, so you'll need to configure those SDKs to disable this feature. If Apple detects IDFA-related code in your app but you don't show the ATT popup, your submission could be rejected.
内容的提问来源于stack exchange,提问作者Himabindu




