RemoteObjC.forApp
Create or reuse a native client for a running app.
js
RemoteObjC.forApp(bundleId)Arguments
| Argument | Type | Meaning |
|---|---|---|
bundleId | string | App 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.