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

# NSScriptSuiteRegistry

The top-level repository of scriptability information for an app at runtime.

```
class NSScriptSuiteRegistry
```

## Overview

Scriptability information specifies the terminology available for use in scripts that target an application. It also provides information, used by AppleScript and by Cocoa, about how support for that terminology is implemented in the application. This information includes descriptions of the scriptable object classes in an application and of the commands the application supports.

There are two standard formats for supplying scriptability information: the older script suite format, consisting of a script suite file and one or more script terminology files, and the newer scripting definition (or sdef) format, consisting of a single sdef file.

There is one instance of `NSScriptSuiteRegistry` per scriptable application. This registry object collects scriptability information when the application first needs to respond to an Apple event for which Cocoa hasn’t installed a default event handler. It then creates one instance of  [`NSScriptClassDescription`](/documentation/Foundation/NSScriptClassDescription) for each object class and one instance of [`NSScriptCommandDescription`](/documentation/Foundation/NSScriptCommandDescription) for each command class, and installs a command handler for each command.

When a user executes an AppleScript script, Apple events are sent to the targeted application. Using the information stored in the registry object, Cocoa automatically converts incoming Apple events into script commands (based on [`NSScriptCommand`](/documentation/Foundation/NSScriptCommand) or a subclass) that manipulate objects in the application.

The public methods of `NSScriptSuiteRegistry` are used primarily by Cocoa’s built-in scripting support. You should not need to create a subclass of `NSScriptSuiteRegistry`.

For information on scriptability information formats, loading of scriptability information, and related topics, see “Scriptability Information” in [Overview of Cocoa Support for Scriptable Applications](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_about_apps/SAppsAboutApps.html#//apple_ref/doc/uid/TP40001976) in [Cocoa Scripting Guide](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_intro/SAppsIntro.html#//apple_ref/doc/uid/TP40002164).

## Topics

### Getting and Setting the Shared Instance

[`+  setSharedScriptSuiteRegistry:`](/documentation/Foundation/NSScriptSuiteRegistry/setShared(_:))

Sets the single, shared instance of `NSScriptSuiteRegistry` to `registry`.

[`+  sharedScriptSuiteRegistry`](/documentation/Foundation/NSScriptSuiteRegistry/shared())

Returns the single, shared instance of `NSScriptSuiteRegistry`, creating it first if it doesn’t exist.

### Getting Suite Information

[`-  suiteForAppleEventCode:`](/documentation/Foundation/NSScriptSuiteRegistry/suite(forAppleEventCode:))

Returns the name of the suite definition associated with the given four-character Apple event code, `code`.

[`suiteNames`](/documentation/Foundation/NSScriptSuiteRegistry/suiteNames)

Returns the names of the suite definitions currently loaded by the application.

### Getting and Registering Class Descriptions

[`-  classDescriptionsInSuite:`](/documentation/Foundation/NSScriptSuiteRegistry/classDescriptions(inSuite:))

Returns the class descriptions contained in the suite identified by `suiteName`.

[`-  classDescriptionWithAppleEventCode:`](/documentation/Foundation/NSScriptSuiteRegistry/classDescription(withAppleEventCode:))

Returns the class description associated with the given four-character Apple event code, `code`.

[`-  registerClassDescription:`](/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.

### Getting and Registering Command Descriptions

[`-  commandDescriptionsInSuite:`](/documentation/Foundation/NSScriptSuiteRegistry/commandDescriptions(inSuite:))

Returns the command descriptions contained in the suite identified by `suiteName`.

[`-  commandDescriptionWithAppleEventClass:andAppleEventCode:`](/documentation/Foundation/NSScriptSuiteRegistry/commandDescription(withAppleEventClass:andAppleEventCode:))

Returns the command description identified by a suite’s four-character Apple event code of the class (`eventClass`) and the four-character Apple event code of the command (`commandCode`).

[`-  registerCommandDescription:`](/documentation/Foundation/NSScriptSuiteRegistry/register(_:)-5mq91)

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.

### Getting Other Suite Information

[`-  aeteResource:`](/documentation/Foundation/NSScriptSuiteRegistry/aeteResource(_:))

Returns an `NSData` object that contains data in `'aete'` resource format describing the scriptability information currently known to the application.

[`-  appleEventCodeForSuite:`](/documentation/Foundation/NSScriptSuiteRegistry/appleEventCode(forSuite:))

Returns the Apple event code associated with the suite named `suiteName`, such as `‘core’` for the Core suite.

[`-  bundleForSuite:`](/documentation/Foundation/NSScriptSuiteRegistry/bundle(forSuite:))

Returns the bundle containing the suite-definition property list (extension `.scriptSuite`) identified by `suiteName`.

### Loading Suites

[`-  loadSuiteWithDictionary:fromBundle:`](/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`.

[`-  loadSuitesFromBundle:`](/documentation/Foundation/NSScriptSuiteRegistry/loadSuites(from:))

Loads the suite definitions in bundle `aBundle`, invoking [`loadSuite(with:from:)`](/documentation/Foundation/NSScriptSuiteRegistry/loadSuite(with:from:)) for each suite found.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)