Search code examples
objective-cmacosapplescriptapplescript-objc

How can I use the Objective-C APIs listed in Script Editor's Library?


According to Script Editor, there are Objective-C APIs that can be used instead of AppleScript or JavaScript. Here's an example, from Terminal:

script editor library

How do I actually use these? Presumably I'd need headers that defined these enums, classes, and methods. Where are those?

Presumably, given those headers, I could also use Swift via bridging, which would be nice, although not mandatory.


Solution

  • You can't.

    Script Editor can only show AppleScript dictionaries.

    You find the Objective-C API in the Apple Developer Documentation

    AppleScriptObjC does not support Swift syntax.