ApplesauceOS
Read Markdown ↗Download .md

ObjC.class

Get a class loaded in SpringBoard and call its native methods directly.

js
ObjC.class(name)

Arguments

ArgumentTypeMeaning
namestringLoaded Objective-C class name.

Returns

Class proxy; missing classes throw.

Example

js
const text = ObjC.class("NSString").stringWithString_("Hello");
console.log(text.toJS());
text.release();

Notes

Start with Objective-C step by step. Also available on app = RemoteObjC.forApp(bundleId) as app.class(). ObjC targets SpringBoard, regardless of the foreground app; RemoteObjC.forApp(...) targets that app. RemoteObjC clients expose the same class/call/create methods. ObjC.C accesses the shared local C client; a remote ObjC client also has C. Class and instance methods support direct shorthand: ObjC.class("NSUUID").UUID(). Use hasClass(name) to check availability in the selected process.

All JavaScript APIs · Automation playbook