How to mix HTML5 development apps in the app. What are the pros and cons of using HTML5 in your app?

Source: Internet
Author: User

Reference Answer:

In iOS, it is usually uiwebview to implement, of course, after iOS8 can use Wkwebview to implement. There are several ways to do this:

    • By implementing the UIWebView proxy method to intercept and determine if scheme is a good deal, then iOS calls the local related API to implement:

123 - (BOOLwebview: ( Uiwebview *) Webview Shouldstartloadwithrequest: ( Span class= "crayon-t" >nsurlrequest *) Span class= "crayon-v" >request Navigationtype: (uiwebviewnavigationtype Navigationtype

    • After iOS7, it can be implemented directly through the Javascriptecore library, by injecting objects into the JS DOM, which corresponds to an instance of a class in our iOS. For more details, please read:
      • OC JavaScriptCore and JS interaction
      • Wkwebview new features and JS interaction
      • Swift JavaScriptCore and JS interaction
    • Can be achieved by Webviewjavascriptbridge. Specific how to use, please go to other blog search it!

Advantages and Disadvantages

    • iOS joins the H5 response is much slower than the native, the experience is not very good, this is the disadvantage.
    • iOS join H5 can be embedded in other functional portals, can be changed at any time, without updating the version can be online, this is the biggest advantage

How to mix HTML5 development apps in the app. What are the pros and cons of using HTML5 in your app?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.