There is one last thing that I have implemented in a couple of my shipping apps.
Miscellany
Universal Links -UIKit Code Tweaks
If you have been playing with the links in the test page, you are aware that the two UIKit apps are not responding to the query arguments. The three “traffic lights” remain gray, no matter what we send.
That’s because we need to add another delegate call, to each one.
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).
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 -The Basics
Now that we have URL Schemes up and going, we’ll be adding Universal Links to our three apps.
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 -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.
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 -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 -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.