<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SceneRestorationBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI24SceneRestorationBehaviorV"
  },
  "title" : "SceneRestorationBehavior"
}
-->

# SceneRestorationBehavior

The restoration behavior for a scene.

```
struct SceneRestorationBehavior
```

## Overview

Use the [`restorationBehavior(_:)`](/documentation/SwiftUI/Scene/restorationBehavior(_:)) scene modifier to apply a
value of this type to a [`Scene`](/documentation/SwiftUI/Scene) you define in your [`App`](/documentation/SwiftUI/App) declaration.
The value you specify determines how the system will restore windows from a
previous run of your application.

For example, you may have a scene that you do not wish to be restored on
launch:

```
@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        Window(id: "network-test", "Network Connection Test") {
            NetworkTestView()
        }
        .restorationBehavior(.disabled)
    }
}
```

## Topics

### Type Properties

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

The automatic behavior. The scene’s windows will be restored as defined
by the underlying platform.

[`static let disabled: SceneRestorationBehavior`](/documentation/SwiftUI/SceneRestorationBehavior/disabled)

The disabled behavior. The scene’s windows will not be restored.

## Relationships

### Conforms To

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

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

---

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)