Skip to Content

ATT & IDFA

App Tracking Transparency (iOS 14+)

Starting with iOS 14, apps must request user permission before accessing the IDFA (Identifier for Advertisers) via the App Tracking Transparency framework.

Automatic ATT Request

By default, the SDK requests ATT permission during initialization:

let config = AttributeHQConfiguration( apiKey: "ak_your_api_key", appId: "your-app-uuid", requestATTOnInit: true // default )

Manual ATT Request

To show the ATT prompt at a custom time (e.g., after onboarding):

let config = AttributeHQConfiguration( apiKey: "ak_your_api_key", appId: "your-app-uuid", requestATTOnInit: false // disable auto-request ) try AttributeHQ.shared.initialize(configuration: config) // Later, when ready: AttributeHQ.shared.requestATTPermission { status in switch status { case .authorized: print("IDFA available for attribution") case .denied: print("Falling back to fingerprint matching") case .restricted: print("ATT restricted by MDM or parental controls") case .notDetermined: print("User hasn't responded yet") @unknown default: break } }

You can delay the ATT prompt using attDelaySeconds to allow the app UI to load first.

Info.plist Setup

You must add the NSUserTrackingUsageDescription key to your Info.plist:

<key>NSUserTrackingUsageDescription</key> <string>We use this identifier to measure advertising performance and attribute app installs to campaigns.</string>

Without this key, the ATT prompt will not appear and IDFA will be unavailable.

Device ID Priority

The SDK uses this priority to identify devices:

  1. IDFA — If ATT is authorized, uses the advertising identifier (deterministic matching)
  2. Keychain UUID — A persistent UUID stored in the iOS Keychain (survives reinstalls)
  3. New UUID — Generated on first launch if no other ID is available

Even without IDFA, the SDK still performs attribution using fingerprint matching (IP + User-Agent). IDFA provides higher confidence (100%) but is not required.

SKAdNetwork

The SDK automatically handles SKAdNetwork for privacy-preserving attribution:

  • Calls SKAdNetwork.updatePostbackConversionValue() when attribution is determined
  • Supports conversion value updates for revenue events
  • No additional configuration required

StoreKit Ad Network ID

Add the AttributeHQ ad network ID to your Info.plist under SKAdNetworkItems to receive SKAdNetwork postbacks from ad networks.

Attribution Without IDFA

When IDFA is not available (user denied ATT, or iOS 13 and below):

Matching MethodConfidenceDescription
Fingerprint (IP + UA)60-80%Probabilistic matching using device characteristics
Organic0%No matching click found

The SDK still provides value without IDFA — fingerprint matching covers most attribution scenarios, especially in markets where users commonly share similar network conditions.