T

NativeHookContext

What an Objective-C hook handler receives for one call of the hooked method.

type NativeHookContext<Receiver extends boolean = true> = { … }

Members

argsunknown[]

The method's explicit arguments, without self and _cmd, borrowed until the handler returns.

The method argument index each entry of args came from, as trimmed by payload.arguments.

original(...args: unknown[]) => NativeObjCResult

Runs the original implementation; it works only synchronously on the hook's thread.

phase"before" | "after" | "replace"

Which handler is running.

selectorstring

The hooked selector's name.

selfReceiver extends true ? NativeObjectHandle : undefined

The receiver, borrowed until the handler returns.

replaceObjectArgument(index: number, value: NativeHandle | null): void

Swaps the object argument at an index of args before the original runs; only during a synchronous handler.