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

SDK-2309 cache link data when initialization is deferred #1369

Closed echo-branch closed 5 months ago

echo-branch commented 5 months ago

Reference

SDK-2309 Cache link data when initialization is deferred

Summary

On React Native we had a caching mechanism to store links until the JS layer was ready. This is not working properly when using the optional deferred init on iOS. This moves the caching to the native iOS layer.

Motivation

Fix cold link open when using deferred init on iOS with React Native

Type Of Change

Testing Instructions

Enable deferred init with the branch.json Add a delayed notifyNativeToInit Install app, but make sure it is fully closed Open the app with a universal link

Without this change the link will be ignored. With this change the link will be used with the deferred init.

Also need to test this on React Native.

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

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 33.33333% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 51.16%. Comparing base (4152af5) to head (2009c84). Report is 13 commits behind head on master.

Files Patch % Lines
Sources/BranchSDK/Branch.m 33.33% 9 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1369 +/- ## ========================================== + Coverage 51.03% 51.16% +0.13% ========================================== Files 66 66 Lines 10126 10133 +7 Branches 3714 3718 +4 ========================================== + Hits 5168 5185 +17 + Misses 4700 4692 -8 + Partials 258 256 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nsingh-branch commented 5 months ago

What does the latest Allow init calls to come in late. commit do?

echo-branch commented 5 months ago

What does the latest Allow init calls to come in late. commit do?

Added comment to code view. Still researching if this change is correct.