BranchMetrics / cordova-ionic-phonegap-branch-deep-linking-attribution

The Branch Cordova Ionic Phonegap SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/cordova-phonegap-ionic/
MIT License
234 stars 144 forks source link

Is this plugin using apple IDFA? It shows up in a grep search. #676

Closed epetre closed 3 years ago

epetre commented 3 years ago

Read this and it's not clear if this plugin uses IDFA automatically. https://blog.branch.io/ios-14-frequently-asked-questions-about-whats-changing-how-to-adapt-to-the-idfa-going-away-and-what-this-means-for-the-industry/

It shows up if we run grep -rl ./' -e 'advertisingIdentifier And we are concerned given that the deadline is approaching.

grep -rl './' -e 'advertisingIdentifier'
.//Pods/Branch/Branch-SDK/BNCSystemObserver.m
.//build/device/Branch.framework/Branch
.//build/emulator/Branch.framework/Branch
.//build/emulator/Branch.framework.dSYM/Contents/Resources/DWARF/Branch
echo-branch commented 3 years ago

If the AdSupport.framework is included, we will request IDFA via selectors. If you do not need the IDFA, you can omit the AdSupport.framework as it has no other purpose. If I recall correctly, cordova does not include it by default.

However, if I'm mistaken and cordova is including the AdSupport.framework by default, you can exclude the branch check for it via the following workaround.

  1. Search for GCC_PREPROCESSOR_DEFINITIONS
  2. Locate Branch.debug.xcconfig and Branch.release.xcconfig
  3. Edit the preprocessor line to GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 BRANCH_EXCLUDE_IDFA_CODE=1
  4. Clean and rebuild

If you breakpoint in BNCSystemObserver.m at getAdId, it should now always return nil.

Edit: Correction, I meant AdSupport.framework not iAd.framework. Been looking at Apple Search Ads too much lately.

epetre commented 3 years ago

Great, thank you!