Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDFA iOS14 returns denied without displaying auth popup

Tags:

idfa

ios14

I am doing a research on getting the IDFA on iOS 14. I am using iPhone 8 Plus.

I have added

<key>NSUserTrackingUsageDescription</key> <string>App would like to access IDFA for tracking purpose</string> 

in the .plist file.

Then added

let type = ATTrackingManager.trackingAuthorizationStatus; 

which returns .denied, having

func requestPermission() {         ATTrackingManager.requestTrackingAuthorization { status in             switch status {             case .authorized:                 // Tracking authorization dialog was shown                 // and we are authorized                 print("Authorized")                              // Now that we are authorized we can get the IDFA             print(ASIdentifierManager.shared().advertisingIdentifier)             case .denied:                // Tracking authorization dialog was                // shown and permission is denied                  print("Denied")             case .notDetermined:                     // Tracking authorization dialog has not been shown                     print("Not Determined")             case .restricted:                     print("Restricted")             @unknown default:                     print("Unknown")             }         }     } 

But I'm getting .denied without any popup.

Do you know what is happening?

like image 822
freezing_ Avatar asked Jul 09 '20 14:07

freezing_


People also ask

Is ATT prompt mandatory?

ATT means that if your app collects data about end-users and shares it with other companies for purposes of tracking across apps and websites, you must use the ATT consent prompt and get user consent in both the publisher and advertiser app. If you don't track, there is no need to display the prompt.

How do I get IDFA on IOS 14?

Apps targeted towards iOS14 will need to use AppTrackingTransparency framework along with AdSupport framework to get the IDFA. AppTrackingTransparency allows developer to request permission from the user to read IDFA instead of just getting the IDFA from the ASIdentifierManager.

What is ATT prompt?

The main component of ATT is the in-app popup (also known as the ATT prompt) that asks the user if they would like to “allow the app to track your activity across other companies' apps and websites.” Users have an option to opt-out or opt-in, and are opted out by default.


1 Answers

There's an option "Allow Apps to Request to Track" in system's Settings app, and if it's off, requestTrackingAuthorization will return .denied immediately.

Privacy Setting
like image 116
dlackty Avatar answered Oct 12 '22 11:10

dlackty