---
title: "window(_:didDecodeRestorableState:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindowdelegate/window(_:diddecoderestorablestate:)"
---

# window(_:didDecodeRestorableState:)

Tells the delegate the window is has extracted its restorable state from a given archiver.

## Declaration

```swift
@MainActor optional func window(_ window: NSWindow, didDecodeRestorableState state: NSCoder)
```

## Parameters

- `window`: The window extracting its restorable state from an archive.
- `state`: The coder extracting the archive.

## Discussion

Discussion This method is called during the window’s restoreState(with:) method.

## See Also

### Managing Restorable State

- [window(_:willEncodeRestorableState:)](appkit/nswindowdelegate/window(_:willencoderestorablestate:).md)
