---
title: NSScriptClassDescription
framework: foundation
role: symbol
role_heading: Class
path: foundation/nsscriptclassdescription
---

# NSScriptClassDescription

A scriptable class that a macOS app supports.

## Declaration

```swift
class NSScriptClassDescription
```

## Overview

Overview A scriptable application provides scriptability information that describes the commands and objects scripters can use in scripts that target the application. That includes information about the classes those scriptable objects are created from. An application’s scriptability information is collected automatically by an instance of NSScriptSuiteRegistry. The registry object creates an NSScriptClassDescription for each class it finds and caches these objects in memory. Cocoa scripting uses registry information in handling scripting requests that target the application. A class description instance stores the name, attributes, relationships, and supported commands for a class. For example, a scriptable document class for a drawing application might support attributes such as file and file type, relationships such as collections of circles, rectangles, and lines, and commands such as align and rotate. As with many of the classes in Cocoa’s built-in scripting support, your application may never need to directly work with instances of NSScriptClassDescription. However, one case where you might need access to a class description is if you override objectSpecifier in a scriptable class. For information on how to do this, see Object Specifiers in Cocoa Scripting Guide. Another case where your application may need access to class description information is if you override indicesOfObjectsByEvaluatingWithContainer:count: in a specifier class. Although you can subclass NSScriptClassDescription, it is unlikely that you would need to do so, or even to create instances of it.

## Topics

### Initializing a Script Class Description

- [init(suiteName:className:dictionary:)](foundation/nsscriptclassdescription/init(suitename:classname:dictionary:).md)

### Getting a Script Class Description

- [init(for:)](foundation/nsscriptclassdescription/init(for:).md)
- [forKey(_:)](foundation/nsscriptclassdescription/forkey(_:).md)
- [superclass](foundation/nsscriptclassdescription/superclass.md)

### Getting basic information about the script class

- [className](foundation/nsscriptclassdescription/classname.md)
- [defaultSubcontainerAttributeKey](foundation/nsscriptclassdescription/defaultsubcontainerattributekey.md)
- [implementationClassName](foundation/nsscriptclassdescription/implementationclassname.md)
- [isLocationRequiredToCreate(forKey:)](foundation/nsscriptclassdescription/islocationrequiredtocreate(forkey:).md)
- [suiteName](foundation/nsscriptclassdescription/suitename.md)

### Getting and comparing Apple event codes

- [appleEventCode](foundation/nsscriptclassdescription/appleeventcode.md)
- [appleEventCode(forKey:)](foundation/nsscriptclassdescription/appleeventcode(forkey:).md)
- [matchesAppleEventCode(_:)](foundation/nsscriptclassdescription/matchesappleeventcode(_:).md)

### Getting attribute and relationship information

- [hasOrderedToManyRelationship(forKey:)](foundation/nsscriptclassdescription/hasorderedtomanyrelationship(forkey:).md)
- [hasProperty(forKey:)](foundation/nsscriptclassdescription/hasproperty(forkey:).md)
- [hasReadableProperty(forKey:)](foundation/nsscriptclassdescription/hasreadableproperty(forkey:).md)
- [hasWritableProperty(forKey:)](foundation/nsscriptclassdescription/haswritableproperty(forkey:).md)
- [key(withAppleEventCode:)](foundation/nsscriptclassdescription/key(withappleeventcode:).md)
- [type(forKey:)](foundation/nsscriptclassdescription/type(forkey:).md)

### Getting command information

- [selector(forCommand:)](foundation/nsscriptclassdescription/selector(forcommand:).md)
- [supportsCommand(_:)](foundation/nsscriptclassdescription/supportscommand(_:).md)

## Relationships

### Inherits From

- [NSClassDescription](foundation/nsclassdescription.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Script Dictionary Description

- [NSScriptSuiteRegistry](foundation/nsscriptsuiteregistry.md)
- [NSClassDescription](foundation/nsclassdescription.md)
- [NSScriptCommandDescription](foundation/nsscriptcommanddescription.md)
