Request App Tracking Transparency authorization

To display the App Tracking Transparency authorization request for accessing the IDFA:

  • Update your Info.plist to add the NSUserTrackingUsageDescription key with a custom message describing your usage

  • call ATTrackingManager.requestTrackingAuthorization when the APP is active and the view is ready.

    ATTrackingManager.requestTrackingAuthorization { status in print("Tracking: authorized:", status == .authorized) }

here are good candidates to place the request in:

  • AppDelegate::applicationDidBecomeActive

  • SceneDelegate::sceneDidBecomeActive

  • ViewController::viewDidAppear