As a SparkPost Elite customer, you may have an iOS application available in Apple’s App Store. With a little configuration, iOS9’s Universal Links allows the email sent with SparkPost to seamlessly integrate with your mobile application. In simple terms, deep linking within an app is a way to identify, address and transport users to specific content within apps.
In iOS, deep linking has existed since iOS 2.0 and was very slow to take hold. This was primarily because the user needed the app first, so deep links were useless for almost every app in the app store. But now in iOS9, deep linking works whether an app is installed or not installed in a seamless way. A recent research note from analysts at Cantor Fitzgerald discussed “in-app linking” as a key driver of future growth for companies.
Although much of what I write about works equally well in SparkPost and SparkPost Elite, this particular feature is currently only available in SparkPost Elite.
What are iOS Universal Links
When your iOS app supports Universal Links, iOS 9+ users can tap any link in their email and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari.
Universal Links give you several key benefits that you don’t get using traditional custom URL schemes. Specifically, Universal Links are:
- Unique. Unlike custom URL schemes in Android and pre iOS9, Universal Links can’t be claimed by other apps, because they use standard HTTP or HTTPS links to your website.
- Secure. When users install your app, iOS checks a file on the SparkPost server to make sure that you allow your app to open URLs on its behalf. Only you can create and upload this file, so the association of your website with your app is secure.
- Flexible. Universal Links work even when your app is not installed. When your app isn’t installed, tapping a link to your website opens the content in Safari, as users expect.
- Simple. One URL works for both your website and your app.
- Private. Other apps can communicate with your app without needing to know whether your app is installed.
Adding support for Universal Links is easy
There are three steps you need to take:
- Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
- Send your SparkPost Elite Technical Account Manager the apple-app-site-association file and they will enable your SparkPost account to handle Universal Links.
- Prepare your mobile app to handle Universal Links.
This is a sample apple-app-site-association file:
SPE Link Tracking Best Practices with Universal Links
Universal Links have the potential to negatively impact application owners. For example, it will send recipients who click on the emails unsubscribe link to the app instead of to the unsubscribe HTTP server. If the app doesn’t know what to do with an unsubscribe requests, then the unsubscribe mechanism will be broken for all iOS mobile users.
It is important that customers who want to implement iOS Universal links maintain accurate link tracking behavior. The mobile application should account for this link swizzling by following the links internally.
It is also advisable to follow any HTTP 302 redirects if the application needs to key off query parameters that are embedded within the URL. The links within an email are subject to link shortening or obfuscation. The 302 redirect will contain the original URL.
With just a little change to your application and configuration, you can easily improve your users experience with your iOS application.
If you would like to do a deeper dive into Universal Links be sure to check out: