ATTrackingManager.requestTrackingAuthorization stopped working on ios 15. Application rejected from Apple.
-
Yes, This Problem has been solved. Please follow below two links. https://developer.apple.com/forums/thread/690607 https://developer.apple.com/forums/thread/690762 – Tajinder singh Sep 27 '21 at 06:08
4 Answers
According to the discussion in Apple Developer Forum, you need to add delay for about one second when calling requestTrackingAuthorization. https://developer.apple.com/forums/thread/690607
Example:
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
// Tracking authorization completed. Start loading ads here.
// loadAd()
})
})
P.S. Also if you have requesting push notification permission, firstly you need request push notification then request tracking authorization with a delay =>
private func requestPushNotificationPermission() {
let center = UNUserNotificationCenter.current()
UNUserNotificationCenter.current().delegate = self
center.requestAuthorization(options: [.sound, .alert, .badge], completionHandler: { (granted, error) in
if #available(iOS 14.0, *) {
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
// Tracking authorization completed. Start loading ads here.
// loadAd()
})
})
}})
UIApplication.shared.registerForRemoteNotifications()
}

- 319
- 2
- 8
The problem has been solved, just call it in applicationDidBecomeActive
:
https://developer.apple.com/forums/thread/690762

- 830
- 1
- 8
- 13

- 738
- 1
- 9
- 18
-
Yes, Solved. Thanks for update. It can solve by this solution as well https://developer.apple.com/forums/thread/690607 – Tajinder singh Sep 27 '21 at 06:11
Follow by apple doc:
Calls to the API only prompt when the application state is
UIApplicationStateActive
.
So, we need to call ATTrackingManager.requestTrackingAuthorization
on
applicationDidBecomeActive
of AppDelegate
.
But If you're using scenes (see Scenes), UIKit will not call this method. Use
sceneDidBecomeActive(_:)
instead to restart any tasks or refresh your app’s user interface. UIKit posts adidBecomeActiveNotification
regardless of whether your app uses scenes.
So, my approach is to register on addObserver
on didFinishLaunchingWithOptions
such as:
NotificationCenter.default.addObserver(self, selector: #selector(handleRequestEvent), name: UIApplication.didBecomeActiveNotification, object: nil)
on handleRequestEvent
:
requestPermission() // func call ATTrackingManager.requestTrackingAuthorization NotificationCenter.default.removeObserver(self, name: UIApplication.didBecomeActiveNotification, object: nil)
Hope this helps. It's work for me.

- 1,518
- 1
- 11
- 14
-
1calling the tracking in sceneDidBecomeActive worked for me. Thank you! – TharakaNirmana Aug 10 '22 at 03:20
-
1Calling it on sceneDidBecomeActive didn't work for me on iOS 16.1 simulator nor device, but registering for UIApplication.didBecomeActiveNotification did! – yood Nov 08 '22 at 14:01
Make sure your iPhone's Settings -> Privacy -> Tracking is enabled. Otherwise, it won't prompt for request Aurthorization.

- 780
- 1
- 6
- 13