This is in a SwiftUI macOS app using the new App
protocol and @main
.
Usage flow:
- User launches app and clicks a button which opens a particular webpage
- Webpage eventually redirects to the app's URL scheme, opening the app and invoking
onOpenURL(_:)
Expected behaviour: The deep link is sent to the existing, currently open app instance
Actual behaviour: A new app instance is launched, causing two instances of the app to be active
Note: There isn't really any code to add since the problem is just dependent on adding a URL scheme to the app and having a webpage go to it.