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

# appleEventCode(forSuite:)

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

```
func appleEventCode(forSuite suiteName: String) -> FourCharCode
```

## See Also

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

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



---

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)