<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindowRestoration",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSWindowRestoration"
  },
  "title" : "NSWindowRestoration"
}
-->

# NSWindowRestoration

A set of methods that restoration classes must implement to handle the recreation of windows.

```
protocol NSWindowRestoration : NSObjectProtocol
```

## Overview

At launch time, the application object retrieves the restoration class and uses its [`restoreWindow(withIdentifier:state:completionHandler:)`](/documentation/AppKit/NSWindowRestoration/restoreWindow(withIdentifier:state:completionHandler:)) method to obtain a new window whose type matches the type that was preserved previously. Classes that adopt this protocol can use the provided information to create (or obtain a reference to) the window in the new application. As part of creating the window, the class should also create any related objects, such as window controllers, normally used to manage the window.

## Topics

### Handling Window Restoration

[`restoreWindow(withIdentifier:state:completionHandler:)`](/documentation/AppKit/NSWindowRestoration/restoreWindow(withIdentifier:state:completionHandler:))

Asks the class to provide a new window for the specified identifier.



---

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)