Universal Links and URL schemes: how do deep links work?
The gist
A deep link is a link that opens a specific screen of the app. There are two mechanisms. A custom URL scheme (myapp://orders/42) is declared in Info.plist (CFBundleURLTypes) and works right away, but nobody owns a scheme: another app can register the same one, and if the app is not installed the link simply fails. A Universal Link is a regular https:// link to your domain: if the app is installed and the domain association is verified, iOS opens the app, otherwise the website opens in Safari.
Universal links are the standard for external links (email, messengers, ads); schemes remain for internal scenarios, such as an OAuth callback via ASWebAuthenticationSession.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep