<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Scripting Bridge",
  "identifier" : "/documentation/ScriptingBridge/SBApplication/class(forScriptingClass:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Scripting Bridge"
    ],
    "preciseIdentifier" : "c:objc(cs)SBApplication(im)classForScriptingClass:"
  },
  "title" : "class(forScriptingClass:)"
}
-->

# class(forScriptingClass:)

Returns a class object that represents a particular class in the target
application.

```
func `class`(forScriptingClass className: String) -> AnyClass?
```

## Parameters

`className`

The name of the scripting class, as it appears in the scripting interface. For example, “document”.

## Return Value

A `Class` object representing the scripting class.

## Discussion

You invoke this method on an instance of a scriptable application. Once you
have the class object, you may allocate an instance of the class and
appropriately the raw instance. Or you may use it in a call to
<doc://com.apple.documentation/documentation/ObjectiveC/NSObjectProtocol/isKind(of:)>
to determine the class type of an object.

---

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)