12

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

YosiFZ
  • 7,792
  • 21
  • 114
  • 221
  • Settings - Privacy - Tracking check that all check marks selected – Andrew Dec 20 '20 at 21:24
  • @Andrew I update my post with the Tracking Screenshot, there is something else I'm missing? – YosiFZ Dec 20 '20 at 21:34
  • Hmm, all looks correct. Stupid question, but are you sure that you use device or simulator with iOS 14? Are you try reboot device? – Andrew Dec 20 '20 at 21:54
  • @Andrew Yes, of course, using ios 14.3 in my iPhone, tried to reboot a couple of times – YosiFZ Dec 20 '20 at 22:10
  • 1
    @YosiFZ I had the same issue. After all i restored the device with "Erase All Content and Settings". "Reset All Settings" didn't work at all btw. Have you found any solutions since then? – cafedeichi Jan 08 '21 at 05:27
  • See my answer for iOS 15 in other thread https://stackoverflow.com/a/69373506/4247449 – Serg Smyk Sep 29 '21 at 09:10

2 Answers2

9

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.

3

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.

Abhishek Aryan
  • 19,936
  • 8
  • 46
  • 65