<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSResponder/allowedClasses(forRestorableStateKeyPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSResponder(cm)allowedClassesForRestorableStateKeyPath:"
  },
  "title" : "allowedClasses(forRestorableStateKeyPath:)"
}
-->

# allowedClasses(forRestorableStateKeyPath:)

Returns the classes that support secure coding.

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

## Parameters

`keyPath`

The key path of the restorable object.

## Return Value

An array of classes that support secure coding.

## 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.

---

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)