Bring Users Back to Your App: Deep Linking for iOS

Takuma Kakehi
5 min readApr 15, 2020

--

Animation by Sergej Pehterev

Getting users to download and come back to your apps is challenging: even if one is enticed with your service or product at your shop, if they are taken to an unrelated home page after app download, they may just close the app and not follow up. Even for those who already have your app on their phone, links in email or social feeds may be a nice lead to get them back to your service, but without deep linking, they may never open your app again.

Deep linking comes into play to help those users come back to your apps. For existing app users, they get to see appropriate content in your app instead of a web page — it is usually harder to retain users on a website in comparison to apps. For new users, we want them to see appropriate content after downloading your app. Deferred deep link is a type of deep linking that passes those destinations along when app download takes place.

Image source: Deep Linking Basics: Deep Links Are Just Links by AppsFlyer

According to Branch, Deep Linking doubled 1-day, 7-day, and 30-day retention rates — only 31% of users will come back the next day of downloads as an industry average (Get Users Onboard with Your Push Notifications).

In this post I summarize methods you can use and the basic implementations for your iOS apps.

Custom URL Schemes

Custom URL scheme is an older technique — its schemes are almost like regular URLs, but each one starts with something unique to your app instead of HTTP or HTTPS. This unique scheme basically opens your app instead of a web page, and passes the destination URL along. Apple recommends Universal Links instead of custom URL schemes, since anyone can use this scheme to open your app without you noticing.

Universal Links

Universal links were introduced by Apple with the introduction of iOS 9 and tvOS 10. Universal links are a HTTP or HTTPS URL that Apple products recognize as pointing resources in both web and app. This way, a single URL can be used to open a website or app depending on whether your app is downloaded or not. From 2019, universal links were introduced to Mac OS applications as well. In order for universal links to function, you need to take the following steps on your web page and app, and they also prevent use by third party applications.

(You need to add an Associated Domains Entitlement to your app and Apple App Site Association file to your website from What’s New in Universal Links | WWDC 2019)

Steps to Setups:

  • Add the Associated Domains Entitlement to your app, which indicates the qualified domains representable in your app. (Example Associated Domains Entitlement from Apple below — internationalized domains must be encoded as Punycode)
<array>
<string>applinks:www.example.com</string>
<string>applinks:*.example.com</string>
<string>applinks:xn--fhqz97e.example.xn--fiqs8s</string> <!--上海海.example.中国-->
</array>
  • Add an Apple App Site Association file to your website, which is a single JSON file stored in a web server that indicates which part of web domains are representable in your app. (Example App Site Association file from Apple below)
{
"applinks": {
"details": [
{
"appIDs": [ "ABCDE12345.com.example.app", "ABCDE12345.com.example.app2" ],
"components": [
{
"#": "no_universal_links",
"exclude": true,
"comment": "Matches any URL whose fragment equals no_universal_links and instructs the system not to open it as a universal link"
},
{
"/": "/buy/*",
"comment": "Matches any URL whose path starts with /buy/"
},
{
"/": "/help/website/*",
"exclude": true,
"comment": "Matches any URL whose path starts with /help/website/ and instructs the system not to open it as a universal link"
}
{
"/": "/help/*",
"?": { "articleNumber": "????" },
"comment": "Matches any URL whose path starts with /help/ and which has a query item with name 'articleNumber' and a value of exactly 4 characters"
}
]
}
]
},
"webcredentials": {
"apps": [ "ABCDE12345.com.example.app" ]
}
}

Issues with Measurements and Uncontrollable Smart App Banner

Universal links provide almost seamless user experience once Associated Domains Entitlement and App Site Association files are set up correctly. However, marketing teams often rely on link wrapping or web redirects for their campaign measurements or attributions. The secure setup of the universal links prevents the team from using these marketing techniques. Additionally, Safari may insert the Smart App banner for pages with universal links. The Smart App banner cannot be controlled and may not be an optimal experience for users.

Smart App Banner examples. These banners cannot be controlled by app developers.

Firebase Dynamic Links

Setting up dynamic links using Firebase makes the implementation of deferred deep linking easier. Deferred deep linking works just like regular deep linking for existing app users — it takes other users to the App Store first to download the app, then see the linked page first after installation completes. This practice is known to optimize conversions especially in cases where a user finds an attractive item in an e-commerce store. In general, deferred deep linking could provide a better user experience with better performance and retention after the downloads.

According to Appsflyer, Deferred Deep Linking x2 the number of users who spend money with x2.7 more dollars on average per user.

Image source: Why Deferred Deep Linking is A Game Changer by AppsFlyer

Universal Links are an underlying framework for how the Firebase dynamic links work. Firebase essentially creates a mini website with a unique subdomain URL that would hold your App Site Association file. If your app already has Firebase installed, the main required setup is to provide a custom subdomain name and input Apple Store ID. The subdomain name should be unique to the project and it may require DNS verification to make sure that you are not using some name that another company may be using. Once the subdomain name is set, your association file can be found under the directory [your project name].page.link/apple-app-site-association.

Getting started with Firebase Dynamic Links on iOS — Pt.1 (Firecasts)

Reference:

--

--

Takuma Kakehi

An experienced product owner and interaction designer with a decade of versatile industry experience.