ApplesauceOS
Read Markdown ↗Download .md

ObjCObject.set

Set a value through native key-value coding.

js
object.set(key, value)

Arguments

ArgumentTypeMeaning
keystringNonempty KVC key.
valueanySupported native argument.

Returns

This proxy.

Example

js
const dictionary = ObjC.create("NSMutableDictionary");
try {
  dictionary.set("message", "Hello");
  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