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

# record()

Creates and initializes a descriptor for an Apple event record whose data has yet to be set.

```
class func record() -> NSAppleEventDescriptor
```

## Return Value

An Apple event descriptor whose data has yet to be set, or `nil` if an error occurs.

## Discussion

An Apple event record is a descriptor whose data is a set of descriptors keyed by four-character codes. You can add information to the descriptor with methods such as [`setAttribute(_:forKeyword:)`](/documentation/Foundation/NSAppleEventDescriptor/setAttribute(_:forKeyword:)), [`setDescriptor(_:forKeyword:)`](/documentation/Foundation/NSAppleEventDescriptor/setDescriptor(_:forKeyword:)), and [`setParam(_:forKeyword:)`](/documentation/Foundation/NSAppleEventDescriptor/setParam(_:forKeyword:)).

Invoking this method is equivalent to allocating an instance of `NSAppleEventDescriptor` and invoking [`init(recordDescriptor:)`](/documentation/Foundation/NSAppleEventDescriptor/init(recordDescriptor:)).

---

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)