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

夙愿已清 提交于 2019-12-03 03:37:58

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" />

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!