This series will walk through the steps needed to implement URL Schemes (Deep Links), and Universal Links in iOS/iPadOS apps (Using Standard UIKit App Delegate, UIKit Scene Delegate, and SwiftUI). This post is an introduction, and will establish our baseline.
Series: Universal Links
This is a series on implementing universal links in iOS apps.
URL Schemes – The Basics
Before we move on to Universal Links, we’ll begin with setting up classic URL Schemes (Deep Links). These are fairly simple, and use most of the same hooks as Universal Links.
URL Schemes -Under the Hood
Let’s take a closer look at what is actually happening, when we implement a URL Scheme in our app.
URL Schemes -Getting Started
We have three URL schemes that we’ll be adding to our example apps. We don’t need to do anything with the Web server. Everything here will be done on the applications, themselves, in Xcode.
URL Schemes -Implementation Step One
OK. We have managed to give our apps a URL Scheme, so they can be opened, using a simple URL. But we aren’t actually doing anything with the URL, besides starting the app.
We have also avoided doing any coding. Time to change things up, and get coding. It will be quite simple, and all the action will happen in the SimpleAppDelegate.swift
file.
URL Schemes -Implementation Step Two
In this post, we’ll integrate our URL Scheme into the UIKit Scene Delegate app, and we’ll be editing the SceneAppDelegate.swift
file.
URL Schemes -Final Step
We have gotten the two UIKit targets working, and we just need to get SwiftUI on board.
SwiftUI is crazy easy to support.
In this post, we’ll integrate our URL Scheme into the SwiftUI app, and we’ll be editing the SwiftUIApp.swift
file.
Universal Links -The Basics
Now that we have URL Schemes up and going, we’ll be adding Universal Links to our three apps.
Universal Links -The Server
In order to support Universal Links in our app, we’ll need to set up a Web server, that will be queried, if the app is not installed. In this case, I have already done that, myself, so I’ll walk us through what I did.
Universal Links -Entitlements
Now that the server is all set, we just need to establish entitlements into our apps, and Universal Links should work (almost -we’ll need to do one more thing for the UIKit targets, but we’re not there, yet).