When you got two permission request - in my case Push Notifications and App Tracking Transparency - you need to call push permission first and then in completionHandler call second permission with 1 sec delay:
if #available(iOS 14, *) {
UNUserNotificationCenter.current().delegate = self
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
options: authOptions,
completionHandler: { _, _ in
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
//you got permission to track
})
}
}
)
}