IDFA Consent in iOS 14

Starting iOS 14.5 access to IDFA requires user consent. You should request IDFA manually using AppTrackingTransparency framework and pass it to Apphud. Update Apphud SDK to 1.0.5 or higher.

Don't forget to add NSUserTrackingUsageDescription to your app's Info.plist

Here is code snippet how you can request IDFA:

#if canImport(AppTrackingTransparency)
import AppTrackingTransparency
#endif
‚Äč
func requestIDFA() {
if #available(iOS 14.5, *) {
ATTrackingManager.requestTrackingAuthorization { status in
guard status == .authorized else {return}
let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
Apphud.setAdvertisingIdentifier(idfa)
}
}
}

Advertising Identifier is required for use in attribution integrations: AppsFlyer, Branch, Facebook, Adjust, Tenjin.

Despite IDFA, filling correct App Store Privacy Information is also required. For more information, read here.