ApplesauceOS
Read Markdown ↗Download .md

ObjCObject.signature

Read native method type information.

js
object.signature(selector)

Arguments

ArgumentTypeMeaning
selectorstringExact selector.

Returns

Object {returnType, argumentTypes}: native Objective-C type-encoding strings, with the implicit receiver/selector arguments omitted. Missing or unsupported selectors can throw.

Example

js
const text = ObjC.call("NSString", "stringWithString:", "Hello");
try { console.log(text.signature("length")); }
finally { text.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