How to collect IDFA for Firebase in modular architecture on iOS 14

638 views Asked by At

To use attributions correctly and Age/Gender user properties in Firebase we should collect IDFA from users devices. In documentation recommended to link AdSupport framework to project and it will do automagically. ("GoogleIDFASupport" framework is obsolete for Firebase)

  • I've checked all open source code of Firebase iOS SDK, AdSupport/AppTrackingTransparency frameworks and their symbols aren't used nowhere
  • IDFA collection isn't logged even with verbose Logging and isn't displayed in DebugView
  • Google have vendored framework "GoogleAppMeasurement", which is dependency of FirebaseAnalytics. I think the IDFA tracking code is obfuscated and placed in that binary
  • Our project have modular architecture (some module/services are defined as a separate projects, and have dynamic frameworks targets)
  • Because of Firebase provides only static libraries - all the Firebase libraries are connected via CocoaPods to special target "FirebaseAdapter" to avoid symbols duplication
  • We use "generate_multiple_pod_projects" CocoaPods flag

Google suggest to link "AdSupport" framework in their documentation, but what target should be linked with AdSupport?

  • App target?
  • FirebaseAdapter target?
  • Pods-FirebaseAdapter target?

Should we link AppTransparency framework in iOS 14? iAd (in one answer from Firebase contributor it was marked as condition to IDFA collecting)?

1

There are 1 answers

0
dlackty On

For both AdSupport & AppTrackingTransparency frameworks, I believe you need to link to your app target.

Please also notice that it's app developer's responsibility to call AppTransparency framework's API to ask user consent before 3rd party SDKs can collect user IDFA.

ATTrackingManager.requestTrackingAuthorization { _ in
}