# ObjC.create

Allocate and initialize a native object.

```js
ObjC.create(className, initializer = "init", ...args)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `className` | string | Class to allocate. |
| `initializer` | string | Init-family selector; default init. |
| `args` | any | Initializer arguments. |

## Returns

Initialized object proxy, or null for nil.

## Example

```js
const object = ObjC.create("NSMutableDictionary");
object.call("setObject:forKey:", "Hello", "message");
console.log(object.toJS());
object.release();
```

## Notes

Start with [Objective-C step by step](/doc/objc). Also available on app = RemoteObjC.forApp(bundleId) as app.create().

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
