What are Universal Links?
Universal Links are a type of deep link on iOS that uses standard https URLs to open content directly in your app when it is installed, and falls back to opening your website in the browser when it is not. Because they are ordinary web links, the same URL works whether or not someone has the app, which makes them well suited to email, messages, and shared links. They are verified by tying your app to your domain.
How Universal Links work
Setting up Universal Links has two halves: your website and your app. On the website you host a file named apple-app-site-association, a JSON document that declares which app identifiers may open links on the domain and which URL paths they apply to. In the app you add the Associated Domains entitlement listing your domain. When iOS first encounters the app, it downloads the association file and confirms that your app is authorized for that domain. After that, tapping a matching https link opens the app, which receives the web URL and routes to the right screen. If the app is not installed, the link simply opens in the browser.
Universal Links versus custom URL schemes
The advantage of Universal Links over a custom URL scheme is trust and graceful fallback. A custom scheme such as myapp:// can be registered by any app, and nothing proves you own it, so two apps can collide on the same scheme. Universal Links require the association file on a domain you control, so only your app can claim those URLs, and unhandled links degrade cleanly to your website rather than failing. The tradeoff is that Universal Links need a hosted file and the entitlement, so they take a little more setup.
Setting them up and how AppFlight fits
In practice you publish the apple-app-site-association file, add the Associated Domains entitlement, and handle the incoming URL in your app the same way you would any deep link. AppFlight builds native Swift and SwiftUI projects, so it can add the Associated Domains entitlement and the URL handling code on the app side, while the association file is hosted on your own domain. With both halves in place, your https links open the app for people who have it installed.
FAQ
What is the apple-app-site-association file?
It is a JSON file you host on your domain, usually under the well-known path, that lists the app identifiers allowed to open links on that domain and which paths they cover. iOS downloads it to verify that your app is authorized to handle the domain links.
What is the difference between Universal Links and a custom URL scheme?
Universal Links use https URLs, prove that you own the domain, and fall back to the website when the app is not installed. A custom URL scheme, like myapp://, can be registered by any app and has no ownership verification or web fallback.
Why are my Universal Links not opening the app?
Common causes are a missing or incorrect apple-app-site-association file, the Associated Domains entitlement not being set, or the user having long-pressed and chosen to open in the browser. The file and entitlement must match the app identifier exactly.