even basic Ionic project with Cordova WKWebview Engine plugin produces white screen

前端 未结 2 1574
天涯浪人
天涯浪人 2021-02-05 17:45

My problem: The ionic app I\'m developing is horribly slow, after finding out UIWebView is the culprit I\'m looking for ways to speed it up, with WKWebView bein

相关标签:
2条回答
  • 2021-02-05 18:39

    I got an ionic2 project working with WKWebview. I think the steps I took are working for ionic1 as well:

    1) Install WKWebview Plugin:

    ionic plugin add cordova-plugin-wkwebview-engine

    2) Install local webserver Plugin:

    ionic plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugins.git#master:local-webserver

    3) Add/change following in your config.xml:

    ...

    <content src="http://localhost:8080" />
    

    ...

    <allow-navigation href="gap://ready" />
    <allow-navigation href="http://localhost:*" />
    

    ...

    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    </feature>
    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
    
    0 讨论(0)
  • 2021-02-05 18:51

    I'm looking into using CrossWalk for IOS which has an implementation of WkWebView working.

    https://crosswalk-project.org/documentation/ios.html

    The project is supported by Intel so there is solid support behind it.

    Another option would be to try and install the following plugin developed by Telerik that swaps in a WKWebView.

    https://github.com/Telerik-Verified-Plugins/WKWebView

    Cordova is also moving to supporting WKWebView with a plugin as well. The support for WKWebView is terrible. It's riddled with bugs since it came out in iOS7. It's slowly getting fixed each ios release.

    Here is to hoping iOS 10 makes some improvements.

    0 讨论(0)
提交回复
热议问题