2
votes

I have a custom URL prefix setup for Firebase dynamic links. I create my shortened URL via the REST API as follows:

{
  "dynamicLinkInfo": {
    "domainUriPrefix": "https://my-custom-domain.com",
    "link": "URL_TO_BE_SHORTENED"
  },
  "suffix": {
    "option": "SHORT"
  }
}

The Firebase project is linked to my iOS and Android apps.

Here is a debug of a link created as per above (I get this from adding ?d=1 at the end of the dynamic link). According to the debug it should open the web link. enter image description here

I would like to user to tap the link and for the URL to open. Currently the app opens on iOS and Android. If the app isn't installed, then it takes the user to the respective app store listing of our app. How can I get our custom domain to work just like a normal shorten URL and take the user to a webpage and not open our app or app store?

1

1 Answers

-1
votes

Actually this is pretty simple, when you create a dynamic link you can define the behaviour on different platforms (ios, android, web). (Choose edit on an existing link to modify behaviour)

Under the section "Define link behaviour for XXX" choose "Open the deep link URL in a browser"

Then the link will be opened directly in the browser.

If you would like to lead them into the app, and only if the app is not installed, redirect them to the url, then Choose: "Open the deep link in your iOS App" -> Select your App And then under the section "If your app is not installed, send the user to" select Custom Url and paste the original URL.