ApplesauceOS
Read Markdown ↗Download .md

ObjCObject.call

Invoke an exact selector on a proxy.

js
object.call(selector, ...args)

Arguments

ArgumentTypeMeaning
selectorstringExact native selector.
argsanyFixed-signature arguments.

Returns

Same conversion rules as ObjC.call.

Example

js
const dictionary = ObjC.create("NSMutableDictionary");
try {
  dictionary.call("setObject:forKey:", "Hello", "message");
  console.log(dictionary.toJS());
} finally { dictionary.release(); }

Notes

Start with Objective-C step by step. Here, object means a proxy returned by ObjC/RemoteObjC, not a global named ObjCObject.

All JavaScript APIs · Automation playbook