frida_objc_create_block
Create an Objective-C block at runtime with custom return type, argument types, and JavaScript implementation for dynamic code injection in Frida.
Instructions
Create an ObjC block at runtime via new ObjC.Block.
target: process name or pid (string).
return_type: return type (e.g. 'void', 'int', 'object').
arg_types: list of argument type strings.
js_body: JavaScript function body for the block implementation.
Returns the block's handle address.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>",
"return_type": "<return_type>",
"arg_types": "<arg_types>",
"js_body": "<js_body>"
},
"name": "frida_objc_create_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| return_type | Yes | ||
| arg_types | Yes | ||
| js_body | Yes |