ATT bug, don't wait for user

Hello, when I'm asking for the ATT permission don't wait for the user response. I doesn't matter which approach use never waits for user answer.

Using xcode 15.2 on iOS 17.4 simulators, versions before like iOS 17.2 works without any issue.

            Task {
                self.resultStatus = await ATTrackingManager.requestTrackingAuthorization()
                completion()
            }
        }
            ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
                self.resultStatus = status
                completion()
            })
        }

I can confirm this bug happens on tvOS 17.4. I have an iOS running on 16.3, which doesn't have the bug.

If anyone would like an example requesting app tracking authorization using the workaround from @davidfromgainesville, but in the form of Objective-C, here is the code I used that is working for me:

void requestTrackingAuthorization()
{
    [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
        if (status == ATTrackingManagerAuthorizationStatusDenied && [ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusNotDetermined)
        {
            [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
                requestTrackingAuthorization();
            }];
        }
        else
        {
            // Do something with status
        }
    }];
}

iOS 17.5 is now live and the bug seems to fixed.

The issue persists on iOS 17.5 on actual devices.

This issue is so strange to me. We released the app tracking transparency last week. It worked fine when I ran the debug app with an Apple TV device on 17.4. Then I tried the one from the AppStore, but it didn't work. And I can't turn on the allow tracking from the setting.

I updated my device to 17.5, which briefly allowed me to turn on the tracking; when I ran the same app from the AppStore, I didn't get the app tracking transparency dialog, and when I rechecked the settings, I couldn't turn on the allow tracking option.

Is anyone experiencing the same issue?

I'm also getting spammed with main thread warnings when I call

    func sceneDidBecomeActive(_ scene: UIScene) {
        Task { [weak self] in
            guard let self else { return }
            
            await ATTrackingManager.requestTrackingAuthorization()
        }
    }

{"message":"This code path does I/O on the main thread underneath that can lead to UI responsiveness issues. Consider ways to optimize this code path","antipattern trigger":"-[NSData dataWithContentsOfFile:options:error:]","message type":"suppressable","show in console":"0"}

ATT bug, don't wait for user
 
 
Q