Reputation: 47861
So I've setup branch.io and universal links on my app and website but the deep link doesn't seem to be working
Using the dynamic link
https://foo.link?%24deeplink_path=event%2F99
I get redirected to
https://foo.com/?$deeplink_path=event%2F99
I was expecting it to go here instead
Additionally - when I trigger the link in my app on device or simulator it doesn't deep link in or trigger the branch event functions in react native - but does open the app.
I've added the methods to AppDelegate and went through all the steps to deep link - did I miss something?
Upvotes: 1
Views: 2429
Reputation: 13613
Alex from Branch here:
You're really close — this is just a minor misconception in how the various Branch configuration parameters work.
First of all, know that a Branch link can contain various 'control parameters' that define system behavior, and an unlimited number of custom key:value
pairs.
On Android and iOS < 9 (both of which use URI schemes for deep linking), the $deeplink_path
param is a control param: Branch automatically passes any value in this parameter into the standard URI path methods when the app opens. On iOS > 9 (which uses Universal Links), $deeplink_path
is treated as just a 'normal' key:value
pair, but you can build some custom code to make it behave the same way as Android and iOS < 9.
Website redirects work a little bit differently. What you actually want here is the $fallback_url
control parameter (or one of its platform-specific varients). This defines where non-app users will be redirected. In this case, https://foo.link?%24fallback_url=https%3A%2F%2Ffoo.com%2Fevent%2F99
should do what you want.
You can find documentation on all these configuration parameters here
Upvotes: 4