ios 中的 UIWebview 会出现问题。苹果将拒绝使用此应用程序。所以我们决定在我们的cordova ios应用程序中使用WKWebview。我安装了cordova-plugin-wkwebview-engine 并添加<preference name="WKWebViewOnly" value="true" />到config.xml 文件中。问题是在启动画面之后它显示白色的空白屏幕。
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" /> …Run Code Online (Sandbox Code Playgroud)