Skip to content

Instantly share code, notes, and snippets.

@SandeepAggarwal
Created September 25, 2021 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SandeepAggarwal/be3baba00921ed59b7faf10b429a71ef to your computer and use it in GitHub Desktop.
Save SandeepAggarwal/be3baba00921ed59b7faf10b429a71ef to your computer and use it in GitHub Desktop.
Podfile contents for removing App Tracking From Branch SDK
def configure_branch_settings(target)
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = ['$(inherited)', 'BRANCH_EXCLUDE_IDFA_CODE=1']
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Branch'
# NOTE: we need to set this in order to compile Branch pod such that it won't call https://developer.apple.com/documentation/adsupport/asidentifiermanager/1614151-advertisingidentifier at runtime. This is to prevent Apple from requiring us to show https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager to users
configure_branch_settings(target)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment