BranchMetrics / ios-branch-deep-linking-attribution

The Branch iOS 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://help.branch.io/developers-hub/docs/ios-sdk-overview
MIT License
731 stars 228 forks source link

Static Framework Missing IDFA Fix #1399

Closed NidhiDixit09 closed 3 months ago

NidhiDixit09 commented 3 months ago

Reference

SDK-2408 -- Investigate loss of AdSupport for Spotify https://branch.atlassian.net/browse/SDK-2408

Summary

Fixed script names in "Run Script" phase of targets static-xcframework and static-xcframework-noidfa.

Type Of Change

Testing Instructions

IDFA Support

Generate a static framework by running script. - /scripts/prep_static_xcframework.sh This will generate a static framework with IDFA support.

Link this framework to a test app with ATTrackingmanager support ( https://help.branch.io/developers-hub/docs/ios-advanced-features#include-apples-attrackingmanager).

Build and Run App. Check logs if idfa is present in requests -

  "hardware_id" : "XXXXXXXXXXXX",
  "hardware_id_type" : "idfa",

IDFA Excluded

Generate a static framework by running script. - ./scripts/prep_static_xcframework_noidfa.sh

This will generate a static framework without IDFA support (Macro BRANCH_EXCLUDE_IDFA_CODE is enabled )

Link this framework to a test app with ATTrackingmanager support ( https://help.branch.io/developers-hub/docs/ios-advanced-features#include-apples-attrackingmanager).

Build and Run App. Check logs if idfa is NOT present in requests -

  "hardware_id" : "XXXXXXXXXXXX",
  "hardware_id_type" : "vendor_id",

Also, logs print following message [BranchSDK][Debug][BNCDeviceInfo checkAdvertisingIdentifier] BRANCH_EXCLUDE_IDFA_CODE flag enabled. IDFA is not available

I am also attaching here static framework (with IDFA enabled) for testing. Branch_static.zip

cc @BranchMetrics/saas-sdk-devs for visibility.