---
title: "restorationBehavior(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/scene/restorationbehavior(_:)"
---

# restorationBehavior(_:)

Sets the restoration behavior for this scene.

## Declaration

```swift
nonisolated func restorationBehavior(_ behavior: SceneRestorationBehavior) -> some Scene

```

## Discussion

Discussion Use this scene modifier to apply a value of this type to a Scene you define in your 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)     } } The default value for all scenes if you do not apply the modifier is automatic. With that strategy, scenes will restore themselves depending on the default behavior for the platform.

## See Also

### Configuring window visibility

- [WindowVisibilityToggle](swiftui/windowvisibilitytoggle.md)
- [defaultLaunchBehavior(_:)](swiftui/scene/defaultlaunchbehavior(_:).md)
- [SceneLaunchBehavior](swiftui/scenelaunchbehavior.md)
- [SceneRestorationBehavior](swiftui/scenerestorationbehavior.md)
- [persistentSystemOverlays(_:)](swiftui/scene/persistentsystemoverlays(_:).md)
- [windowToolbarFullScreenVisibility(_:)](swiftui/view/windowtoolbarfullscreenvisibility(_:).md)
- [WindowToolbarFullScreenVisibility](swiftui/windowtoolbarfullscreenvisibility.md)
