---
title: restorableStateKeyPaths
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsresponder/restorablestatekeypaths
---

# restorableStateKeyPaths

Returns an array of key paths representing the restorable attributes of the responder.

## Declaration

```swift
class var restorableStateKeyPaths: [String] { get }
```

## Return Value

Return Value An array of NSString objects, each of which contains a key path to one of the responder’s attributes.

## Discussion

Discussion You can use this method instead of, or in addition to, the encodeRestorableState(with:) and restoreState(with:) methods to save and restore the state of your responder. The key paths you return must refer to attributes that are key-value coding and key-value observing compliant. To learn more about these mechanisms, see Key-Value Coding Programming Guide and Key-Value Observing Programming Guide. When changes are detected, the specified attributes are automatically written to disk with the rest of the application’s interface-related state. At launch time, the attributes are automatically restored to their previous values.

## See Also

### Handling Window Restoration

- [allowedClasses(forRestorableStateKeyPath:)](appkit/nsresponder/allowedclasses(forrestorablestatekeypath:).md)
- [encodeRestorableState(with:)](appkit/nsresponder/encoderestorablestate(with:).md)
- [encodeRestorableState(with:backgroundQueue:)](appkit/nsresponder/encoderestorablestate(with:backgroundqueue:).md)
- [restoreState(with:)](appkit/nsresponder/restorestate(with:).md)
- [invalidateRestorableState()](appkit/nsresponder/invalidaterestorablestate().md)
