Options for defining how a scene's windows behave when used within a managed
window context, such as full screen mode and Stage Manager.
Use values of this type in conjunction with the
``Scene/windowManagerRole(_:)`` modifier to override the default system
behavior.
For example, you can specify that a secondary `Window` scene should use the
principal role for full screen and Stage Manager:
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
Window("Organizer", id: "organizer") {
OrganizerView()
}
.windowManagerRole(.principal)
}
}
Members (1)
get · iOS 18.0+
automatic
TypeScript
static get automatic(): WindowManagerRole
Swift declaration
static let automatic: WindowManagerRole
The automatic role. The type and configuration of the scene will be
used to determine how its windows behave in full screen and Stage
Manager.
On macOS, ``WindowGroup`` and ``DocumentGroup`` scenes will use the
`principal` role. ``Window`` scenes will use the `principal`
role when they are specified as the first scene in the app's
definition, and use the `associated` role otherwise. ``Settings``
will use the `associated` role.