A bridge used for Objective-C and JavaScript, which implements the same mechanism as in Android.
- Add the files WebViewJsBridge.h, WebViewJsBridge.m, WebViewJsBridge.js to your project, make sure that WebViewJsBridge.js is in the "Copy Bundle Resources" while not in the "Compile Sources" (in the Build Phases tab)
- Create a class which subclass WebViewJsBridge
- Implement your methods in the subclass
- Make sure the arguments can only be void or an array
Good luck~