<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSScriptSuiteRegistry/register(_:)-5mq91",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScriptSuiteRegistry(im)registerCommandDescription:"
  },
  "title" : "register(_:)"
}
-->

# register(_:)

Registers command description `commandDesc` for use by Cocoa’s built-in scripting support by storing it in a per-suite internal dictionary under the command name.

```
func register(_ commandDescription: NSScriptCommandDescription)
```

## Discussion

Also registers with the single, shared instance of [`NSAppleEventManager`](/documentation/Foundation/NSAppleEventManager) to handle incoming Apple events that should be handled by the command.

## See Also

[`register(_:)`](/documentation/Foundation/NSScriptSuiteRegistry/register(_:)-9aplw)

Registers class description `classDescription` for use by Cocoa’s built-in scripting support by storing it in a per-suite internal dictionary under the class name.

[`loadSuite(with:from:)`](/documentation/Foundation/NSScriptSuiteRegistry/loadSuite(with:from:))

Loads the suite definition encapsulated in `dictionary`; previously, this suite definition was parsed from a `.scriptSuite` property list contained in a framework or in `bundle`.



---

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)