<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSClassDescription/register(_:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSClassDescription(cm)registerClassDescription:forClass:"
  },
  "title" : "register(_:for:)"
}
-->

# register(_:for:)

Registers an `NSClassDescription` object for a given class in the `NSClassDescription` cache.

```
class func register(_ description: NSClassDescription, for aClass: AnyClass)
```

## Parameters

`description`

The class description to register.

`aClass`

The class for which to register `description`.

## Discussion

You should rarely need to directly invoke this method.

---

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)