

You establish this relationship in two parts:Īn apple-app-site-association file that you add to your websiteĪ -domains entitlement that you add to your app (this part is described in Preparing Your App to Handle Universal Links) To create a secure connection between your website and your app, you establish a trust relationship between them. You can test universal links on a device.Ĭreating and Uploading the Association File Prepare your app to handle universal links. You can place the file at the root of your server or in the. Upload the apple-app-site-association file to your HTTPS web server. There are three steps you need to take:Ĭreate an apple-app-site-association file that contains JSON data about the URLs that your app can handle. If the user taps a universal link to a URL in a different domain, iOS opens the link in your app.įor users who are running versions of iOS earlier than 9.0, tapping a universal link to your website opens the link in Safari.Īdding support for universal links is easy. When a user is browsing your website in Safari and they tap a universal link to a URL in the same domain as the current webpage, iOS respects the user’s most likely intent and opens the link in Safari. Universal links let users open your app when they tap links to your website within WKWebView and UIWebView views and Safari pages, in addition to links that result in a call to openURL:, such as those that occur in Mail, Messages, and other apps. Other apps can communicate with your app without needing to know whether your app is installed. One URL works for both your website and your app. When your app isn’t installed, tapping a link to your website opens the content in Safari, as users expect. Universal links work even when your app is not installed. Only you can create and upload this file, so the association of your website with your app is secure.įlexible. When users install your app, iOS checks a file that you’ve uploaded to your web server to make sure that your website allows your app to open URLs on its behalf.

Unlike custom URL schemes, universal links can’t be claimed by other apps, because they use standard HTTP or HTTPS links to your website. Universal links give you several key benefits that you don’t get when you use custom URL schemes. If your app isn’t installed, tapping a link to your website opens your website in Safari. When you support universal links, iOS users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari.
