---
title: "register(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsscriptsuiteregistry/register(_:)-5mq91"
---

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

## Declaration

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

## Discussion

Discussion Also registers with the single, shared instance of NSAppleEventManager to handle incoming Apple events that should be handled by the command.

## See Also

### Related Documentation

- [register(_:)](foundation/nsscriptsuiteregistry/register(_:)-9aplw.md)
- [loadSuite(with:from:)](foundation/nsscriptsuiteregistry/loadsuite(with:from:).md)

### Getting and Registering Command Descriptions

- [commandDescriptions(inSuite:)](foundation/nsscriptsuiteregistry/commanddescriptions(insuite:).md)
- [commandDescription(withAppleEventClass:andAppleEventCode:)](foundation/nsscriptsuiteregistry/commanddescription(withappleeventclass:andappleeventcode:).md)
