【发布时间】:2020-07-10 18:37:05
【问题描述】:
iOS 中的 UIWebview 会有问题。 Apple 将拒绝使用此功能的应用程序。所以我们决定将 WKWebview 用于我们的 cordova ios 应用程序。我安装了 cordova-plugin-wkwebview-engine 并在 config.xml 文件中添加了<preference name="WKWebViewOnly" value="true" />。
问题是在启动屏幕之后它显示白色的空白屏幕。
<?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:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-ionic-webview" spec="^4.1.3" />
<preference name="WKWebViewOnly" value="true" />
<engine name="ios" spec="~5.1.1" />
<plugin name="cordova-plugin-background-mode" spec="^0.7.3" />
<plugin name="cordova-plugin-badge" spec="^0.8.8" />
<plugin name="cordova-plugin-camera" spec="^4.1.0" />
<plugin name="cordova-plugin-device" spec="^2.0.3" />
<plugin name="cordova-plugin-geolocation" spec="^4.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.3" />
<plugin name="cordova-plugin-x-toast" spec="^2.7.2" />
</widget>
【问题讨论】:
-
你解决了吗?我有同样的问题。
-
如何解决这个问题?我已经添加了插件,但仍然是他们的问题。我怎样才能解决这个问题?我正在使用 PhoneGap。
-
有什么消息吗?仍然有问题,我尝试了此页面中的所有内容
标签: ios cordova ionic3 wkwebview