0

Currently we have universal links which look like http://example.com/sharing/< id >/ which open our iOS app through the safari smart banner. But smart banners sucks, so we'd like to use the Branch.io journeys banner, which actually appears when people load the page. Since these links are already in the wild, they need to continue to work have have some way into the app. In the future we'll generate branch.io sharing links from inside the app, but these landing pages on the web will continue to exist.

I'm calling branch.init('key_test_foo'); from javascript, and the Journeys banner appears. It only ever shows the "Get" button and never "Open". I'm not clear how I pass the object ID through branch.io so that the app can navigate to the right place.

The app is built in Xamarin, and I think I have the integration built correctly following the example. It is not in our production build through the app store, I'm just running the app through the debugger in Visual Studio.

I'd even settle for an "Open in App" link like imgur has, as long as there's something I can click in safari to open the app in the right place.

I don't feel like I should have to "make a link" every time this page gets viewed, right?

EDIT: One additional question. I think I want to change my og:url so that when facebook scrapes my page, it will open through branch (instead of back to my site). But how would I set that? Facebook isn't going to run any JS when it loads the page is it? Can I just set it to my.app.link and magic will happen from the al:ios:url that drives the deeplink routing?

I think this: https://stackoverflow.com/a/34596340/401636 might be the solution.

Aaron McMillin
  • 2,532
  • 27
  • 42
  • I am not sure I understand your question about og:url. The SO post you point to talks about query parameters which can be used for deep linking. Could you elaborate on the use case you want to achieve? – Amruta Deshmukh Oct 27 '17 at 19:15

1 Answers1

1

1. The Journey's banner navigating to your app.

Branch uses the domain of the format -alternate.app.link domain for the link behind the Journeys button. To ensure that clicking on Journeys CTA, navigates to your app ensure that you have added the -alternate.app.link domain for your app in the 'Associated Domains' file. You can check the documentation providing information on how to add the domains here.

2. The Get v/s Open issue for the Journeys CTA

Branch uses a variable has_app to determine whether the device has the app or not. For this variable to be set to true, a user should click on the Journey CTA and be redirected to the app (not the App Store). Also, the issue of the CTA not updating is common during development, because the app is frequently re-installed on the device. Due to this testing, the flag, has_app, goes in a faulty state. To force reset the has_app variable to change the Journey's banner CTA from 'Download' to 'Open', please follow these steps:

  1. Click on the Download button - this should redirect to the Play or App Store
  2. Install the app
  3. Return to the web page with the Journeys banner, which should still display the Download button
  4. Tap on the Download button again - the app should open
  5. Close and then re-load the web page with the Journeys banner - the banner should now have an "Open" button
  6. Tap on the "Open" button Please note that the above steps are required only during development mode for testing purposes. Out in the wild in production, users will not see this issue. Also, it might take some time (as long as 30 minutes) for the flag to updated.

3. Navigating to the right place in your App

If you plan on using your old domain links for deeplinking, you can update your Link domain on the Branch dashboard to the domain your links are currently using. You can then recreate the links again with the Branch API. Please note, Branch will be the authoritative registrar for your domain and you cannot host anything on this domain.

If you do not wish to do that, you can append additional link parameters to your Journeys button. These link parameters will be available in your app when the user clicks on the Journey CTA and is redirected to the App Store/your app. You can refer to the documentation here for more information.

For both the above scenarios, in order to read the link parameters in your app, you should integrate the Branch SDK in your Xamarin app. (Reference documentation here)

Amruta Deshmukh
  • 985
  • 5
  • 10