Unable to present Tracking User Description alert on real device

Hi everybody. I have some problems with the function "ATTrackingManager.requestTrackingAuthorization(completionHandler:)", provided by AppTrackingTransparency library.
It shows nothing when tested on real device. However, if I build and run the same exact code on a simulator, it works properly and shows the alert.

Here some additional informations:
  • My deployment iOS target is 14.0

  • I added "Privacy - Tracking Usage Description" key in the Info.plist file

  • I added "AppTrackingTransparency.framework" into my app's Target

  • I imported "AppTrackingTransparency" in my Swift file

  • The toggle in Settings -> Privacy -> Tracking "Allow App to Request to Track" is on

My swift code looks like this:
Code Block
//MySwiftFile.swift
func askPermission() {
ATTrackingManager.requestTrackingAuthorization { (status) in
//handled
print(status)
}
}

On a real device, the AuthorizationStatus always return value 2 (denied).

Does anybody have the same issue?

Replies

On a real device, the AuthorizationStatus always return value 2 (denied).

Once user decided to deny or allow tracking, the result is stored in the device, which needs to be modified through the Settings app.
Have you checked the Privacy (Tracking) settings of the real device?
I am having a similar issue that I only encountered once I updated my physical device to 14.3. ATTrackingManager.trackingAuthorizationStatus always returns .denied:
  • I've verified that Settings > Privacy > Tracking > Allow Apps to Request to Track is enabled

  • Under Settings > Privacy > Tracking, there is no entry for my app to toggle individual app permissions on or off

  • Uninstalling and reinstalling app has no effect on status

  • Rebooting device has no effect

  • I have a separate device that has 14.4 beta 2 installed. This device behaves as expected (uninstalling and reinstalling app correctly resets permission to .notDetermined)

tonioquellovero, are you running 14.3 as well?

Update. Similar issues here:
https://developer.apple.com/forums/thread/669490
https://stackoverflow.com/questions/65384782/ios-14-requesttrackingauthorization-status-always-denied

As far as I can tell, this appears to be an iOS 14.3 issue. I did not have this issue before updating to iOS 14.3, and I do not have this issue on 14.4 beta 2.
I also have same problem in iPhone SE 2 device.
I also have this issue on:
  • iOS 14.3

  • iOS 14.4 (I've updated today)

On both my devices:
  • iPhone SE (1st gen)

  • iPad Pro 11" (1st gen).

Experiencing the same issue here:

Popup doesn't appear

iPhone 12 Pro Max 14.3 & 14.4

Popup appears

iPhone X 14.2 & 14.4
iPad Pro 11" 14.2 & 14.4
iPhone Simulators

All devices are set to "Allow Apps to Request to Track"

With the iPhone 12 Pro Max, even with this setting enabled, the App doesn't appear within the "Privacy -> Tracking" submenu as it does with the others. To me, it seems like the "Allow" setting is stuck on "Deny" as the toggle seems to have no clear effect.
Can report that I have the same issue, tried both on an iPhone X and 12 Pro Max running 14.4, with rebooting between changing the Allow Apps to Request to Track settings. The only thing that worked was a factory reset, but that shouldn't be needed.
The thing that finally worked :-) was a "General->Reset->Reset All Content and Settings". Then when I installed my app the prompt appeared and I could select to Allow tracking. What a relief !

I then noticed that my app appeared at the bottom of the Settings page and when I tap it there's an option to disable/enable tracking at whim. The app also now appears in Privacy/Tracking. Prior to this uninstalling/reinstalling did not show my app in Settings or Privacy->Tracking.

Furthermore, when I deleted the app and reinstalled, it showed the message again and my app reappeared in Settings.

Thank goodness I could sort this out, took 2 days to try to fix it before hitting reset. The only reason I can think ATT does not work as expected is that all apps installed prior to iOS 14.4 / ATT are assumed to be set to "do not allow tracking," but the OS misses adding the app to the Settings page so there's no way of changing it. Although, this does not explain why an uninstall/reinstall of the app still doesn't work. Anyway, creating a fresh app might work (untested), but factory reset definitely does work !

It's good to know that "Reset All Content and Settings" works, thank you for that answer!

But I want to test this, and I'd rather not delete my entire iOS device! Also, I'm a little concerned about what this means for the experience our existing users will have once ATT goes live?
Looks like ATT will be a huge headache on developer side.
Dear apple, setting all installed apps to Denied is not the plausible solution and looks like makes them in unresolved state.
At the moment, my dev phone is my personal phone. There is no way I would reset my personal phone to factory settings.
我们的App已经因为此问题被拒绝。
我们使用了api,但是审核人员的一台设备无法弹出授权弹窗。

my device also have similar problem, iPhone 11, iOS 14.4.2, privacy->allow tracking previous off, then i turn it on, but all app setting has no att switch ,and my app trackingAuthorizationStatus alway return deny. I have try:
  1. reinstall my app

  2. restart iphone

  3. re turn off and turn on privacy->allow app tracking

then same problem yet.
I dont know why, it's OK in simulators, but problem on iphone device.

Next week we will submit app updates, my be reject!
Just updated to 14.5. Still not working...
Same here, tested without any success on 3 physical devices under 14.5 : iPhone 12 Pro Max, iPhone 7 & iPad Air 2.
Is there already a radar, or someone at Apple is already aware of that ? When is it going to be fixed?
Same here with iOS 14.5. I have not try to "Reset All Content and Settings" yet.
I have the issue on my old and new iPhones (7 & 12 mini). Maybe because I have disabled IDFA previously on iOS 13 before to migrate to iOS 14 ?
I have the same problem. Is anybody from apple reading this here too and takes some action ? Because i never see any reply from someone of the apple team.

I think this is a very very urgent problem and needs to be fixed asap because it is impossible for me now to update my apps.

The dialog is never shown on my real device

Frank