WasmPatch
WebAssembly hot patching for iOS & macOS

Patch native apps
at runtime.

Compile a tiny C patch to WebAssembly, load it inside your app, and replace Objective-C & Swift methods on the fly — sandboxed, verifiable, and without an App Store round-trip.

#include <wasmpatch.h>

WAPObject patched_token(WAPObject self, const char *cmd) {
    return new_objc_nsstring("patched at runtime");
}

int entry() {
    // The registered name is derived from the real symbol —
    // a typo won't compile, never a silent no-op.
    WAP_REPLACE_CLASS(SessionManager, "authToken", patched_token);
    return 0;
}

What you get

A real bridge between WebAssembly and the Obj-C runtime

Patch logic runs in a wasm interpreter and reaches into the live runtime through a typed bridge.

↺

Method replacement

Swap class & instance method implementations at runtime via libffi — callers transparently hit your patch.

⌘

Swift & Obj-C

Hook any Obj-C method, and any @objc dynamic Swift method, with clean Swift APIs.

▦

Struct bridging

Pass & return structs by value — geometry types plus arbitrary structs, unions, and bitfields.

⟳

Blocks both ways

Invoke completion handlers you're handed, and create blocks to pass into Objective-C.

⇲

Remote delivery

WAPPatchManager fetches, verifies, caches, and applies patches from your server.

🔏

Signed & safe

SHA-256 integrity plus EC P-256 signature authenticity verified before a patch ever loads.

Read next

Dig in