---
title: "allowedClasses(forRestorableStateKeyPath:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsresponder/allowedclasses(forrestorablestatekeypath:)"
---

# allowedClasses(forRestorableStateKeyPath:)

Returns the classes that support secure coding.

## Declaration

```swift
class func allowedClasses(forRestorableStateKeyPath keyPath: String) -> [AnyClass]
```

## Parameters

- `keyPath`: The key path of the restorable object.

## Return Value

Return Value An array of classes that support secure coding.

## Discussion

Discussion The system calls the function during a secure state restoration and restores values only for the allowed classes your app returns in the array.

## See Also

### Handling Window Restoration

- [encodeRestorableState(with:)](appkit/nsresponder/encoderestorablestate(with:).md)
- [encodeRestorableState(with:backgroundQueue:)](appkit/nsresponder/encoderestorablestate(with:backgroundqueue:).md)
- [restoreState(with:)](appkit/nsresponder/restorestate(with:).md)
- [restorableStateKeyPaths](appkit/nsresponder/restorablestatekeypaths.md)
- [invalidateRestorableState()](appkit/nsresponder/invalidaterestorablestate().md)
