In our app we show a pre-alert screen before requesting tracking authorization.
For this, we check ATTrackingManager.trackingAuthorizationStatus.
On iOS, everything works as expected.
On Mac Catalyst however, ATTrackingManager.requestTrackingAuthorization returns immediately with .notDetermined as result and without presenting a system alert.
Is this a bug, or is ATT actually not needed for Mac Catalyst apps?
Running macOS 13.3.1, app deployment target iOS 15.
Sample code:
public func shouldAskForPermission() -> Bool {
switch ATTrackingManager.trackingAuthorizationStatus {
case .authorized, .denied, .restricted:
return false
case .notDetermined:
return true
@unknown default:
return true
}
}
public func requestTrackingAuthorization(completion: @escaping ((GA4Event) -> Void)) {
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .notDetermined:
// on macOS, always .notDetermined