Deep link URL Scheme doesn't call any function(swift)
After couple days struggling with scheme url , I finally found the answer . my emulator's iOS version is 13 . in iOS 13 UIApplication, open url doesn't get call (at least in my case maybe)
you should override below function in SceneDelegate which is available in iOS 13 :
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
if let url = URLContexts.first?.url{
print(url)
}
}
Edited : if the user taps the link when your app isn't running, you won't respond to it
You have to implement scene(_:willConnectTo:options:)
to detect the URLContext in the options: and deal with it.