TechnologiesApp Extensions & System Integration

ScriptingBridge

iOSmacOStvOSwatchOSvisionOS

ScriptingBridge lets a Swift or Objective-C program on macOS send Apple events to scriptable apps to control them and exchange data. You connect to a target app through SBApplication, then work with its scripting objects as SBObject instances and with collections of those objects as SBElementArray. Adopt SBApplicationDelegate to respond to events and errors that arise while communicating with the scripted app.

Connecting to a Scriptable App 1

Establish a bridge to a target scriptable application to send it Apple events.

  • Cl
    SBApplicationmacOS 10.5+
    The `SBApplication` class provides a mechanism enabling an Objective-C

Scripting Objects 2

Work with the scripting objects a target app exposes and with collections of them.

  • Cl
    SBObjectmacOS 10.5+
    The `SBObject` class declares methods that can be invoked on any object in a
  • Cl
    SBElementArraymacOS 10.5+
    `SBElementArray` is subclass of `NSMutableArray` that manages collections of

Responding to Events 1

Adopt a delegate to handle events and errors that occur while communicating with the scripted app.

  • Pr
    SBApplicationDelegatemacOS 10.5+
    This informal protocol defines a delegation method for handling Apple event
← App Extensions & System Integration