react-native-branch-deep-linking-attribution
react-native-branch-deep-linking-attribution copied to clipboard
iOS ~50% appstarts, branch does not work at all.
I implemented react-native-branch
in an expo managed app with the expo wrapper.
At about 40-50% of the iOS app starts in production, the branch sdk does nothing at all.
Then callback of .subscribe()
is never called. The getLatestReferringParams()
promise is not resolved. I thought this has something to do with timing and tested different subscription
call points during runtime, but it does not help.
Do you have any ideas?
This is only on iOS, Android works fine.
I have the same issue, does someone know what can cause it?
I discovered that the native driver don't call the api endpoint api2.branch.io/v1/open and so the subscribe callback is not fired. But i still don't know why this happen.
Are you ejecting the expo app and implementing the lifecycle methods? These lifecycle calls happen before the JS layer is ready, so they must be in native code. Both platforms make some some attempt to recover, but Android is more aggressive about it.
Thanks for your reply, but currently i'm not ejecting the expo app. I noticed that expo SDK 35 is using an old version of this library, in particular version 3.1.1. Maybe some fix about that have been done in latest version?
I've updated to SDK 36 wich is using the latest version of react-native-branch-deep-linking-attribution and I still have the same problem
Hey this is a non-trivial feature request to support expo without ejecting. Our currently supported integration is ejecting the expo app and setting up in native code.
Technical reason is that iOS lifecycle works differently from Android and hooking into it automatically is dangerous within an SDK. We've seen conflicts with other SDKs and client code by trying to do that kind of magic.
In fact the problem is related to expo. I think we can close this one. Thanks for your help
I am also facing this problem in some of the iOS devices in the Production app. It always opens the app but didn't call the listener. If the app is running in background and user taps on the link, it calls the listener.
I am not using expo. It mostly happens on iOS 13.5.1 version devices. Please help as it's breaking the user redirections.
React-Native version - 0.61.1 Branch version - 4.2.1 npm version - 6.13.7 node version - v13.11.0
@aadityapaliwal94 In the future, please open a separate issue if you're not using the same setup as the original issue report.
Did you remember to implement the iOS lifecycle methods in native code? Linking code is handled before react native is ready, and therefore must be native code.
Are you using UIScenes? If so, there's a known bug where the app callback is not called in some situations. You'll need to use a workaround. See the SceneDelegate sample code in the following document. https://help.branch.io/developers-hub/docs/ios-basic-integration
Sorry @echo-branch, will remember to open a new issue :)
Yes, I did implement all iOS lifecycle methods which define here https://help.branch.io/developers-hub/docs/react-native in AppDelegate. I am sure, I am not using any UIScenes in the app,
It's very critical. Please help
Thanks.
Thanks @echo-branch. I have created one here https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution/issues/600