Skip to content

Use WKWebView instead of UIWebView #321

Closed

Description

@ckknight

It would be nice if there were a way to use WKWebView instead of UIWebView when using the <WebView> component, as WKWebView has substantial performance benefits.

Activity

  1. drkibitz commented on Mar 27, 2015

    @drkibitz
    Contributor

    It also comes with problems. Would like to differentiate between the 2 as separate components.

  2. LinusU commented on Mar 27, 2015

    @LinusU
    Contributor

    @drkibitz What kinds of problem? The only thing I can think of is that it requires iOS 8. Maybe we can choose UIWebView when on iOS 7 and lower, otherwise use WKWebKit.

  3. gabro commented on Mar 27, 2015

    @gabro
    Contributor

    WKWebView is known to be "broken" or at least unfinished. Here's a relevant thread about why (for instance) Google Chrome for iOS still uses UIWebView: https://code.google.com/p/chromium/issues/detail?id=423444

    A relevant fragment of the discussion:

    A partial list of regressions relative to UIWebView that we’re currently aware of:

    • There is no cookie management API, which means there is no obvious way to clear/manage cookies
    • Protocol handlers no longer work, which breaks several very important features
    • POST bodies are missing from delegate callbacks, which breaks certain aspects of form handling
  4. vjeux commented on Mar 27, 2015

    @vjeux
    Contributor

    We should have WebViewIOS and WKWebViewIOS instead of a generic WebView component. Anyone up for the renaming and providing both implementations?

  5. chandlervdw commented on Mar 31, 2015

    @chandlervdw

    While still buggy, it looks like Telerik has implemented a WKWebView plugin for Cordova that gracefully degrades to UIWebView in <= iOS 7. I agree with @vjeux that we could go ahead and split the components, setting the stage for a working WKWebView.

  6. jaygarcia commented on Mar 31, 2015

    @jaygarcia
    Contributor

    +1 on @vjeux's suggestion.

  7. sophiebits commented on Mar 31, 2015

    @sophiebits
    Contributor

    Why do we need both?

  8. vjeux commented on Mar 31, 2015

    @vjeux
    Contributor

    @spicyj we should be able to expose all the platform features and let the developer pick the one that makes sense for their use case.

  9. sophiebits commented on Mar 31, 2015

    @sophiebits
    Contributor

    I agree in principle but my understanding is that UIWebView is preferable only if you need a synchronous API (or need to do low-level configuration), neither of which are super compelling reasons from the JS side. I'm okay either way I guess but the UIWebView/WKWebView vs WebViewIOS/WKWebViewIOS suggested naming is odd to me.

  10. joewood commented on Mar 31, 2015

    @joewood

    Isn't there still an issue with WKWebView in that it cannot load from a local resource, it has to load over http? Telerik included a mini-http server in the Cordova plugin to workaround this issue, as far as I remember. Just mentioning, as it may not be as simple as a drop-in replacement.

  11. mydearxym commented on May 11, 2015

    @mydearxym

    +1 I use Semantic-ui to build my mobile app on iOS , and it kind of slow , maybe the WKWebView will speed it up

  12. koenbok commented on May 15, 2015

    @koenbok

    Does anyone happen to know if the JIT is enabled in JSContext on desktop?

  13. brentvatne commented on May 30, 2015

    @brentvatne
    Collaborator

    ^ cc @ide

  14. changed the title [-]Use WKWebView instead of UIWebView[/-] [+][WebView] Use WKWebView instead of UIWebView[/+] on May 31, 2015
  15. added
    Good first issueInterested in collaborating? Take a stab at fixing one of these issues.
    on May 31, 2015
  16. 50 remaining items

  17. amloelxer commented on Jun 19, 2018

    @amloelxer

    @hramos any word on if there are going to be instructions on building on iOS from source anytime soon? I would love to poke around on this and other issues, but as I believe we discussed before, the only instructions to build from source are for Android and they are here https://facebook.github.io/react-native/docs/building-from-source.html. Am I missing something? Are there any guides for building from source for iOS?

  18. amloelxer commented on Jun 19, 2018

    @amloelxer

    Also/ or if someone could explain it to me, I would be happy to make a PR to the docs

  19. ckknight commented on Jul 10, 2018

    @ckknight
    Author

    I opened this issue over 3 years ago. The lack of action on it has once again blocked a major feature.

  20. smathson commented on Jul 10, 2018

    @smathson

    @ckknight If lack of action is blocking a major feature for you, consider using https://github.com/CRAlpha/react-native-wkwebview. We are using it in production with no problems.

  21. kelset commented on Jul 31, 2018

    @kelset
    Contributor

    👋 related to this whole WebView topic, just wanted to let you know that "something is moving": within the core we decided to try an planning an "extraction" of this component into its own separate repo for easier maintenance.

    You can follow along and give feedback here: react-native-community/discussions-and-proposals#3

  22. jamonholmgren commented on Sep 10, 2018

    @jamonholmgren
    Collaborator

    Because https://github.com/react-native-community/react-native-webview uses WKWebView by default, I'm not planning to migrate this issue over there. This issue can probably be closed.

  23. kelset commented on Sep 10, 2018

    @kelset
    Contributor

    Sounds good to me - closing

  24. luisnaranjo733 commented on Sep 10, 2018

    @luisnaranjo733

    Should we consider WebView to be officially deprecated from RN and migrated to react-native-community?

  25. kelset commented on Sep 10, 2018

    @kelset
    Contributor

    Basically, yes. It will be properly announced when 0.57.0 is released but yeah, that's what will happen.

  26. locked as resolved and limited conversation to collaborators on Dec 11, 2019
  27. added a commit that references this issue on Apr 22, 2020
    3850915
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: WebViewRelated to the WebView component.Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Help Wanted :octocat:Issues ideal for external contributors.Platform: iOSiOS applications.Resolution: LockedThis issue was locked by the bot.Type: DiscussionLong running discussion.Type: EnhancementA new feature or enhancement of an existing feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions