Universal Links

What are Universal Links?

Universal Links, introduced by Apple in iOS 9, provide a standardized method for seamlessly transitioning between web content and corresponding in-app content on iOS devices. Unlike traditional deep linking methods, Universal Links operate as standard web URLs, enabling smoother user experiences and improved mobile app integration. Custom URL schemes, once a common method for deep linking, have largely been superseded by Universal Links due to their limitations and lack of compatibility with modern iOS features.

How Do Universal Links Work in iOS?

Before Universal Links, the primary mechanism to open up an app when it was installed was redirecting to an app’s URI scheme in Safari. This put the routing logic in Safari, but there was no way to check if the app was installed or not. This meant that developers would try to call the URI scheme 100% of the time, in the off chance that the app was installed, then fallback gracefully to the App Store when not using a timer.

Universal Links were intended to fix this. Instead of opening up Safari first when a link is clicked, the iOS operating system will check if a Universal Link has been registered for the domain associated with the link, then check if the corresponding app is installed. If the app is currently installed, it will be opened. If it’s not, Safari will open and the http(s):// link will load. This process is facilitated by associated domains, which allows apps to declare specific domains and enables seamless interaction between websites and apps.

Functionally, Universal Links allow you to have a single link that will either open your app or open your mobile site. Android devices utilize a similar concept known as Android App Links, enabling apps to handle web URLs and provide a cohesive user experience across platforms.

Here is a Guide to Implementing Universal Links.

Limitations of Apple Universal Links

  • They are not Universal. At all.
    Apple implemented Universal Links in a way that would force the major app platforms (Facebook, Twitter, Pinterest, etc) to make substantial and harmful changes to the way they handle external links. Currently, the way that most of these feed-style apps handle external links is to intercept the user click and open with an internal webview. This allows them to do a ton of tracking of how the user navigates the web, but only within the confines of the app. Triggering a Universal Link requires them to send a clicking user externally and loses their ability to track, which is core to their business. Because of this, if you plan on using your links on these platforms, you must build special edge case handling to support deep linking with legacy methods. Facebook has their own App Links standard which promises similar functionality to Universal Links, but their flagship iOS app doesn’t even support their own standard. As of March 2016, it’s basically impossible to open up your app out of Facebook in a reliable way. There are few apps that support Universal Links today and most are Apple-built apps, like Mail, Notes, and Messages.
  • Universal Links don’t work for email campaigns.
    Email is a primary communication channel for companies interacting with their users, and is becoming increasingly relevant in mobile marketing. Because of the volume and complexity of email campaigns, most brands end up using an external provider like Sailthru, Mailchimp, or Sendgrid. These providers provide an array of services, one of which is open, click, and conversion tracking. In order for them to do click tracking, they must wrap the original link in a redirect so that the user hits the provider’s server prior to being sent to the destination. Sound familiar? It’s basically the description of every transactional and marketing email that you receive every day. The bad news: It’s impossible to use Universal Links in this scenario. You can’t wrap a Universal Link in a redirect and still have it work. So, either you universify the redirecting domain or you give up click tracking entirely. Every marketer we’ve talked to has said that this is a deal breaker for them. We have had to do a ton of work to support this use case for mobile marketers, so that finally Branch works with all major providers to provide click/install tracking for Universal Links in email. No company would do this on their own, and they shouldn’t have to.
  • They are easily broken by users and hard to reenable.
    It’s incredibly easy for a user (or an app developer for that matter) to permanently disable Universal Links on the phone. A user simply needs to click the domain name in the top right hand corner of the screen after clicking a Universal Link. You’ll notice in iOS 9 that there’s both a back button and a link to the domain if you originated from a Universal Link. Here’s an example from LinkedIn: If I were to click ‘linkedin.com,’ it would open up a Safari web browser and permanently disable Universal Links for my device. There are few ways to reenable them, but for all intents and purposes, a user would never figure it out.

  • Universal Links are nearly impossible to debug and test.
    For developers, the ability to verify the functionality of a feature is critical to development. Debugging Universal Links is easily a 6-7 step process spanning a web server config, developer portal configuration, and native app project configuration. And it’s incredibly easy to make a mistake along the way. Forget an end bracket in the structured JSON file you have to host on your own server? Broken Universal Links. Didn’t include the entitlements file in your app build? Broken Universal Links. It’s treacherous. Despite the hundred ways that Universal Links can break, Apple didn’t provide a single validator tool to help a developer debug. Branch built its own Universal Links validator to save developers from walking through each step and checking every line of code to ensure they didn’t miss a critical step. What should take five minutes can take a day or two to debug.

    Universal Links Validator

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.

Dive into Deep Linking with Branch

Download this guide and learn more about the value that deep links can bring to your brand, as well as to your consumers!