Is it possible to only allow a single window instance on macOS?
WindowGroup/DocumentGroup allow the user to create multiple instances of a window. I'd like to only allow one, for an Onboarding sequence.
I've checked the Scene documentation, and it appears the only types conforming to the Scene protocol are WindowGroup, DocumentGroup and Settings. How can I create a single Window in a SwiftUI App?
An example use case:
WindowGroup/DocumentGroup allow the user to create multiple instances of a window. I'd like to only allow one, for an Onboarding sequence.
I've checked the Scene documentation, and it appears the only types conforming to the Scene protocol are WindowGroup, DocumentGroup and Settings. How can I create a single Window in a SwiftUI App?
An example use case:
Code Block swift struct TutorialScene: Scene { var body: some Scene { // I don't want to allow multiple windows of this Scene! WindowGroup { TutorialView() } }