Responding to a custom scheme url with SwiftUI with a Window, not a WindowGroup

I have an app that uses Window, and not WindowGroup, for the main window. Before I made this change, the .onOpenURL function was working fine. When I switched to a single window, the onOpenURL function stopped being called.

How can I respond to requests to open URLs for my app using Window?

Responding to a custom scheme url with SwiftUI with a Window, not a WindowGroup
 
 
Q