Can't deep link with Chrome on iOS

13.4k views Asked by At

I'm currently trying to build out a custom deep linking scheme for an iOS app that I'm working on. The format of the URL looks like this

[scheme]://[host]/[path]

I have registered The URL scheme within my app and everything works perfectly fine in Safari. However when using Chrome, I can't get the deep link to work at all. It always just begins a google search on the phone and never opens the app. I know that I have to use an intent flag on Chrome, but everything I try seems to fail. Can you deep link to a custom scheme on Chrome on iOS? And if so how do you format the URL?

1

There are 1 answers

1
Alex Bauer On BEST ANSWER

Alriiight, let's address these issues in order, because there are several:

  1. Custom URI schemes work just fine in Chrome and use the same format as everywhere else (scheme://path/to/content). But you have to put them behind a user action (i.e., a link or a redirect). You can't type them directly into the address box (this is the case on both iOS and Android, by the way).
  2. Chrome Intents are for Chrome on Android only. They are not implemented in the iOS version of Chrome, which instead responds to Universal Links and URI schemes.
  3. Just because you can use custom URIs in both Safari and Chrome for deep linking doesn't mean you should. In fact, it hasn't been a good idea for over a year now, because there is no way to avoid nasty error messages and lack of app-not-installed fallback behavior.

For a much more in-depth description of what should be done instead, you can read this blog post. High-level summary is you will need to support both custom URI schemes and Universal Links, and you'll need a bunch of logic to intelligently switch between the two depending on the situation. This is a lot of work, and most major apps now use a service like Branch.io (full disclosure: I'm on the Branch team) for this.