<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 15.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SceneLaunchBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI19SceneLaunchBehaviorV"
  },
  "title" : "SceneLaunchBehavior"
}
-->

# SceneLaunchBehavior

The launch behavior for a scene.

```
struct SceneLaunchBehavior
```

## Overview

Use the [`defaultLaunchBehavior(_:)`](/documentation/SwiftUI/Scene/defaultLaunchBehavior(_:)) modifier to apply a value
of this type to a [`Scene`](/documentation/SwiftUI/Scene) you specify in your [`App`](/documentation/SwiftUI/App). The value you
specify determines how the system will present the scene in the absense of
any previously restored scenes on launch of your application.

For example, you may wish to present a welcome window on launch of your
app when there are no previous document windows being restored:

```
@main
struct MyApp: App {
    var body: some Scene {
        DocumentGroup(newDocument: MyDocument()) { configuration in
            DocumentEditor(configuration.$document)
        }

        Window("Welcome to My App", id: "welcome") {
            WelcomeView()
        }
        .defaultLaunchBehavior(.presented)
    }
}
```

## Topics

### Type Properties

[`static let automatic: SceneLaunchBehavior`](/documentation/SwiftUI/SceneLaunchBehavior/automatic)

The automatic behavior.

[`static let presented: SceneLaunchBehavior`](/documentation/SwiftUI/SceneLaunchBehavior/presented)

The presented behavior. The scene will present itself in the absence of
any previously restored scenes.

[`static let suppressed: SceneLaunchBehavior`](/documentation/SwiftUI/SceneLaunchBehavior/suppressed)

The suppressed behavior. The scene will not present itself in the
absence of any previously restored scenes.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)