Documentation

TrackingPermissionsView

A SwiftUI View that introduces App Tracking Transparency (ATT) and receives interaction events for initiating tracking permissions from the system.

TrackingPermissionsView with a light color scheme. A SwiftUI Starter Kit Component.
TrackingPermissionsView with a light color scheme.
TrackingPermissionsView with a dark color scheme. A SwiftUI Starter Kit Component.
TrackingPermissionsView with a dark color scheme.

Usage

TrackingPermissionsView(
    interactor: .init(
        didSelectEnable: {
            // Example tracking authorization usage:
            //
            // Task {
            //   let result = await TrackingController.requestAuthorization()
            //   print("Tracking: \(result)")
            // }
        },
        didSelectSkip: {}
    )
)

Features

  • Supports light and dark device color schemes by default.
  • Supports font scaling via Dynamic Type.
  • Supports usage in SwiftUI Previews for easy debugging and testing.