TrackingController
A Swift Controller Class that acts as a convenience wrapper for the
App Tracking Transparency and AdSupport
frameworks.
Before asking for App Tracking authorization, make sure to include
NSUserTrackingUsageDescription key-values in the
application Info.plist. Not doing so will crash the app at runtime.
Usage
Task {
let authorized = await TrackingController.requestAuthorization()
if authorized {
// authorized: setup tracking
} else {
// denied/restricted
}
}