ApplesauceOS
Read Markdown ↗Download .md

RemoteObjC.forApp

Create or reuse a native client for a running app.

js
RemoteObjC.forApp(bundleId)

Arguments

ArgumentTypeMeaning
bundleIdstringApp identifier; the app must have automation enabled.

Returns

ObjC client.

Example

js
openApp("com.apple.Preferences");
const app = RemoteObjC.forApp("com.apple.Preferences");
console.log(app.getInfo());

Notes

Start with Objective-C step by step. Does not launch the app. Reuse the client during a script. Background/suspended apps may not respond. Use ObjC directly for SpringBoard. This client supports the same direct method syntax, such as app.class("NSBundle").mainBundle().

Also available as

ObjC.forApp.

All JavaScript APIs · Automation playbook