<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XcodeKit",
  "identifier" : "/documentation/XcodeKit/XCSourceEditorExtension/commandDefinitions",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "XcodeKit"
    ],
    "preciseIdentifier" : "c:objc(pl)XCSourceEditorExtension(py)commandDefinitions"
  },
  "title" : "commandDefinitions"
}
-->

# commandDefinitions

The array of command definitions used by Xcode to associate command names with their implementation in an extension.

```
optional var commandDefinitions: [[XCSourceEditorCommandDefinitionKey : Any]] { get }
```

## Discussion

Implement this property when you need to override the command definitions specified in your extension target’s Info.plist file. There are no guarantees about the thread or queue on which this property is accessed.

## See Also

[`struct XCSourceEditorCommandDefinitionKey`](/documentation/XcodeKit/XCSourceEditorCommandDefinitionKey)

A key in the dictionary that defines a source editor command.



---

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)