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 Privacy - Tracking Usage Description (NSUserTrackingUsageDescription) to your app's Info.plist
Here is code snippet how you can request IDFA:
Swift
Flutter
1
#if canImport(AppTrackingTransparency)
2
import AppTrackingTransparency
3
#endif
4
5
func requestIDFA() {
6
if #available(iOS 14.5, *) {
7
ATTrackingManager.requestTrackingAuthorization { status in
8
guard status == .authorized else {return}
9
let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
10
Apphud.setAdvertisingIdentifier(idfa)
11
}
12
}
13
}
Copied!
1
On Flutter please use the following plugin:
2
https://pub.dev/packages/app_tracking_transparency
3
4
and then use:
5
static Future<void> setAdvertisingIdentifier(String idfa) async
Copied!
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.
Last modified 7mo ago
Copy link