I've added a custom URL scheme to my Xcode project (I'm using SwiftUI).
In the AppDelagate file I've added:
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print(url.absoluteString)
print("work")
return true
}
When I to Safari (sampleurlscheme://) in either the emulator or a physical device the code is not being executed (i.e. the logs do not show etc), But it is taking me to the app.
Is there something I'm missing or could this be a bug ?
It appears that this is being handled in SceneDelegate.swift with function:
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With