Based on the complex drawbacks of native app updates, many apps now use the Hybrid method. To achieve faster update speed and better flexibility.
Then native and JS The mutual calls need to be resolved.
Method:
< p>1. Natively call JS
The native method of using webView:
[webView stringByEvaluatingJavaScriptFromString:@ “xxx'”];
2. JS call Native
Use protocol eg: what://login
The specific type can be negotiated, and then parse the url and proceed Related operations, such as parsing starting with what, means our app protocol, and then
The following fields are used for related operations. Login represents login, so the login page can be adjusted natively.