<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSScriptCommandDescription/init(suiteName:commandName:dictionary:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScriptCommandDescription(im)initWithSuiteName:commandName:dictionary:"
  },
  "title" : "init(suiteName:commandName:dictionary:)"
}
-->

# init(suiteName:commandName:dictionary:)

Initializes and returns a newly allocated instance of `NSScriptCommandDescription`.

```
init?(suiteName: String, commandName: String, dictionary commandDeclaration: [AnyHashable : Any]?)
```

## Parameters

`suiteName`

The name of the suite (in the application’s scriptability information) that the command belongs to. For example, `"AppName Suite"`.

`commandName`

The name of the script command that this instance describes.

`commandDeclaration`

A command declaration dictionary of the sort that is valid in script suite property list files. This dictionary provides information about the command such as its argument names and types and return type (if any).

## Return Value

The initialized command description instance. Returns `nil` if the event constant or class name for the command description is missing; also returns `nil` if the return type or argument values are of the wrong type.

## Discussion

This method registers `self` with the application’s global instance of [`NSScriptSuiteRegistry`](/documentation/Foundation/NSScriptSuiteRegistry) and also registers all command arguments with the registry.

## See Also

  [Cocoa Scripting Guide](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_intro/SAppsIntro.html#//apple_ref/doc/uid/TP40002164)



---

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)