Branch listening for links

Hello - I’m integrating Branch into my app and can’t quite figure out how to test the incoming links, since the simulator does not seem to respond to branch links. Without that, I’m not sure how to examine the bundle params that are being passed in so that I can figure out which screen to open. Maybe I’m missing something obvious here, can someone please help.

I’m following the exact instructions in the documentation:

Expo.DangerZone.Branch.subscribe((bundle) => {
  if (bundle && bundle.params && !bundle.error) {
  	// `bundle.params` contains all the info about the link.
  }
});

I just have no idea what the structure of bundle.params is or how I can examine it if the only I can get the app to respond to a link is if I create a stand alone app and upload to iTunes.

Thank you.

Hi @lorenzsell, we pull Branch directly from the react native API, and their docs on the Params object has detail on what the expected structure is: https://github.com/BranchMetrics/react-native-branch-deep-linking#params-object

In order to test your app when it is standalone – you can test it in the Genymotion simulator (Android) or the iOS simulator, see: https://docs.expo.io/versions/v26.0.0/distribution/building-standalone-apps#5-test-it-on-your-device-or-simulator

Also: If you already have a production version of your app, in order to publish versions of your app that wont be pulled in by your prod standalone, you should build and publish your test standalone on a different release channel: https://docs.expo.io/versions/v26.0.0/distribution/release-channels

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.