marcuswestin/WebViewJavascriptBridge ? reverse-engineered prompt

Reverse engineered prompt

Build me an Objective C library for iOS and macOS that lets a native app talk back and forth with JavaScript inside a web view. I want it to work with the common Apple web views, and I want both sides to be able to register named handlers and call each other with optional responses. Please include a simple example app I can run to see messages going from JavaScript to Objective C and back, plus a basic test setup if that makes sense. Also make it easy to drop into a project or install with CocoaPods, and include the JavaScript snippet needed to set up the bridge in a page. If there are any tricky web view lifecycle details or timing issues, handle those cleanly so it feels reliable and easy to use.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab