I am not sure what the solution here is. Maybe only allow injection to sites you control (via apple association file).
I am not sure what the solution here is. Maybe only allow injection to sites you control (via apple association file).
If your app uses the JavaScriptCore[3] framework to run JS in a VM in-process directly, you have even more options for interfacing between JS and native code.
Note that this has to be explicitly hooked up by the app (i.e., none of this applies within, say, Safari).
[1]: https://developer.apple.com/documentation/webkit/wkuserconte...
[2]: https://developer.apple.com/documentation/webkit/wkuserconte...
[3]: https://developer.apple.com/documentation/javascriptcore
With the appropriate libraries you can use JS to call Swift and Obj C code.
Long answer: no
All it really means is that the JS and Swift/Obj C can pass data between each other and the library is set up to parse that data and call the appropriate code. It's just an automatic RPC.
A domain verification would be a huge hassle for me, since I provide an app builder that allows my non-technical customers to build an app (which includes a webview). Asking them to do domain verification would be tricky.