iOS 14 requestTrackingAuthorization status always denied

Viewed 5078

I'm trying to prepare my app for Admob ios 14, I read this article:

https://developers.google.com/admob/ios/ios14

And I did everything they wrote down, but when I run this command:

func requestIDFA() {
    if #available(iOS 14, *) {
        ATTrackingManager.requestTrackingAuthorization(completionHandler: { [self] status in
            loadAdMob()
        })
    } else {
        loadAdMob()
    }
}

status is always denied and no popup message is showing.

I approve the:

  1. Allow apps to request to track
  2. Personalized ads

flags in the settings app.

I also tried to delete the app but still the same issue, any idea what is the problem?

EDIT: Tracking settings screen:

enter image description here

2 Answers

The thing that finally worked for me 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. Afterwards my app appeared in Settings, which it had not before, and on tapping it there's an option to disable/enable tracking. The app also now appears in Privacy/Tracking, which it did not before.

I tested further by deleting the app and reinstalling, and again it showed the message to allow tracking.

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.

In conclusion, creating a fresh app might work (untested), but factory reset definitely does work.

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.

Release notes for iOS and iPadOS 14.5.1

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.

Related