<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSClassDescription/attributeKeys",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSClassDescription(py)attributeKeys"
  },
  "title" : "attributeKeys"
}
-->

# attributeKeys

Overridden by subclasses to return the names of attributes of instances of the described class.

```
var attributeKeys: [String] { get }
```

## Return Value

An array of `NSString` objects containing the names of attributes of instances of the described class.

## Discussion

For example, a class description that describes Movie objects could return the attribute keys `title`, `dateReleased`, and `rating`.

If you have an instance of the class the receiver describes, you can use the `NSObject` instance method <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/attributeKeys> instead.

## See Also

[`toManyRelationshipKeys`](/documentation/Foundation/NSClassDescription/toManyRelationshipKeys)

Overridden by subclasses to return the keys for the to-many relationship properties of instances of the described class.

[`toOneRelationshipKeys`](/documentation/Foundation/NSClassDescription/toOneRelationshipKeys)

Overridden by subclasses to return the keys for the to-one relationship properties of instances of the described class.



---

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)