Not working ATTrackingManager.requestTrackingAuthorization callback on 17.4

Environment:

  • Xcode Version: 15.3 (15E204a)
  • SDK Runtime: iOS 17.4 (17.4 - 21E213) - com.apple.CoreSimulator.SimRuntime.iOS-17-4

Issue:

When calling requestTrackingAuthorization of ATTrackingManager, the completionHandler is immediately called with a value of notDetermined.

This behavior is consistent even with async methods used in Runtime 14.0 and above.

My app update was also rejected because of this.

My app update was also rejected because of this. Is there any solution ?

I reverted back to Xcode 15.2 (17.2) from 15.3 (17.4) using https://www.xcodes.app/ and it now works as expected again.

A workaround is to call the async version of the function like this:

Task {
  let result = await ATTrackingManager.requestTrackingAuthorization()
  // ...
}

Because it looks like they broke only the function with completion handler:

ATTrackingManager.requestTrackingAuthorization(completionHandler: { _ in })

I'm encountering the same issue on 17.4

Tried the async await version and same issue, immediately responds with denied before user chooses allow / deny.

Same here. Firs of all it gives a .denied status, than shows an alert with options, and user answers, than it never go back to completion to show explicitly that user answered something. But on the next launch of the app, it shows the correct status.

Not working ATTrackingManager.requestTrackingAuthorization callback on 17.4
 
 
Q