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

I think this happens with the following steps
  • Have a phone with 14.4 (or less)

  • Enable ad limiting

  • Update to 14.5

  • Disable ad limiting

  • From now on, even with new installed apps, you will not see ATT popup

@cihadturhn

but this would be very bad behavior in my eyes. It should behave like giving consent for europe or something else.

When i uninstall an application everything "should" be deleted including all settings etc etc. and also the choice of app tracking

and when i reinstall the application the dialog should popup again (without getting any stored information from a deleted app !!)

There is no logical reason for me that apple also saves information of deleted apps on the phone.

I do not think that apple has the right to do this.
The behavior @cihadturhn explains seem to be what I'm able to replicate:
  • If you are on iOS 14.5 and disable apps tracking you: you have to enable it, then (sometimes) sign out/back into iCloud.

  • If you are on iOS < 14.5 and disable apps tracking you, then update to iOS 14.5 with it disabled: You have to factory reset and NOT restore from an iCloud backup. Disabling it and signing out/back into iCloud does not cause the permission request to go through.

I also have same problem in iPhone 11 with 14.4.2
Same problem here, iPhone 8 Plus with 14.5. Also tested with 14.4.2... In my case, even trying to sign out/back into iCloud solves the problem: still receiving DENIED status
Updating to iOS 14.5.1 fixed this issue.
I can see ATT request dialog.
Apps are shown in Setting->Privacy->Tracking page.

Maybe ATT bug fixed with this version.


Thank you.
@Ponkly I read what's new in 14.5.1 and you're right. Looks like it's a hotfix just for this issue.
Trying now, hopefully it'll resolve it.
Apple released iOS and iPadOS 14.5.1. According to Apple's release notes, the update fixes a bug with App Tracking Transparency that may have prevented some users from receiving prompts from apps.

This update fixes an issue with App Tracking Transparency where some users who previously disabled Allow Apps to Request to Track in Settings may not receive prompts from apps after re-enabling it. This update also provides important security updates and is recommended for all users.

Updated OS, now I can see ATT dialog.

Wow the delete content and setting worked for me. But i'm lucky because this was a new test device with nothing on it.

I am amazed that after making such a ****** process, Apple can't even be bothered to help developers make apps for it. They really are a terrible company aren't they.

It's happening to me using iOS 15. Is someone else facing the same issue? Also, I noticed a bunch of apps are no longer appearing in the settings screen.

  • I have iOS 15.2 and I'm facing the same problem regarding the display of the prompt on a real device.

Add a Comment

You need to call it when UIApplicationStateActive.

In my case, the problem was that I was calling ATTrackingManager.requestTrackingAuthorization from AppDelegates didFinishLaunchingWithOptions function.

Just calling the function from applicationDidBecomeActive fix the problem.

  • Exactly, that was the solution for me as well. Thanks!

    Tested on iOS 15.0.2.

  • This worked for me as well

  • I have iOS 15.2 and this solution isn't worked for me :(