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

# property(with:code:)

Returns an object of the designated scripting class representing the
specified property of the receiver

```
func property(with cls: AnyClass, code: AEKeyword) -> SBObject
```

## Parameters

`code`

A four-character code that uniquely identifies a property of the
receiver.

## Return Value

An instance of the designated `class` that represents the
receiver’s property identified by `code`.

## Discussion

`SBObject` subclasses use this method to implement application-specific
property accessor methods. You should not need to call this method directly.

> Note: This method doesn’t retrieve the value of the property. To get the
> value, call ``doc://com.apple.Scripting-Bridge/documentation/ScriptingBridge/SBObject/get()``.

---

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)