Hello All – I am a newbie here ... trying to get my first iOS Swift (Xcode 11.2.1 / Swift 5 / iOS 13.2) app to open via URL and process the URL string. The app opens just f
you need to use this function in your appDelegate
func application(_ application: UIApplication, continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if let incomingURL = userActivity.webpageURL {
print(incomingURL)
}
return false
}
I just found a solution here: application(...continue userActivity...) method not called in ios 13
The trick is to also implement the SceneDelegate.swift
functions for Apps with iOS > 13. This function should be called if you open the URL confirmevent://HelloWorld
:
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
print(URLContexts.debugDescription)
}