URI Schemes

What are URI schemes?

A Uniform Resource Identifier (URI) is a string that identifies a resource without ambiguity. From a semantic point of view, a URI follows the same format as URL. But the key difference is that a URI is just used as an identifier, and is not necessarily intended to locate a resource like in a URL.

How are URIs different from URLs?

If you want to start a riot in a room full of engineers, you could have a debate about tabs vs. spaces for code indentation. Or you could mix up the difference between “URI and URL.” Essays have been written about this, but for our purposes just remember that all URLs are also URIs. The important part is the piece at the beginning: the “scheme”. You’re already familiar with the https:// and https://schemes. You may even have encountered ftp:// or feed://. All of these indicate the type of content being requested, and your mobile app can register its own custom URI scheme. For example, myapp://.

If you are researching deep links, you probably have come across significant content about URI schemes. Facebook is such a case, where URI schemes are the main way you can deep link from a retargeting campaign into an app. Throughout much of the history of app development, URI schemes were the primary method of deep linking into apps on both iOS and Android.

The Limitations of URI Schemes

Unfortunately, there are significant drawbacks to custom URI schemes, most notably the inability to easily handle these two situations:

  • When the app isn’t installed.
  • When more than one app tries to claim myapp://.

URI schemes have no built-in fallback option, meaning that if a user doesn’t have an app installed when clicking a link shared by a friend, they will simply see an error page. There is also no central registration system, meaning URI collisions can happen (Apple’s official stance is “there is currently no process…”). Many developers built workarounds for the first issue using complicated JavaScript redirects, but these tended to break with each new iOS release. There will likely never be a solution for the second issue. Because of these limitations, both iOS and Android have developed second generation deep linking standards known as Universal Links and App Links, respectively. Apple has since blocked the JavaScript redirection approach to URI schemes, making Universal Links essential for iOS deep linking. App Links have far seen far lower adoption.

Are URL/URI Schemes Obsolete?

According to Apple, yes. Starting from iOS 9.2, Apple no longer officially supports URI schemes for deep linking, and developers were forced to implement Universal Links in order to get equivalent functionality on iOS.

In reality, not yet. Universal Links are great when they work, but there are still plenty of places where you need to use URI schemes as a backup and you are leaving a significant amount of traffic on the table if you rely on them exclusively. The Android ecosystem is far too fragmented to even consider abandoning URI schemes at any point in the near future.

How to Set Up Universal Links to Deep Link on Apple iOS

When Apple announced “Universal Links” in its WWDC pitch back in 2015, we were excited to incorporate it into the Branch deep linking platform. Little did we know how complicated it would be to get it working, so we thought we’d share a guide on how to do it to help.

Universal Links

What are Universal Links? Universal Links, introduced by Apple in iOS 9, provide a standardized method for seamlessly transitioning between…