根据 Apache Cordova 博客,iframe 可能无法使用 WKWebView。 (https://cordova.apache.org/news/2018/08/01/future-cordova-ios-webview.html https://cordova.apache.org/news/2018/08/01/future-cordova-ios-webview.html)
我在 App Store 中有一个 Cordova 应用程序,它非常依赖 iframe。由于 UIWebView 可能会在 iOS 13 中被删除,有没有办法让 iframe 使用 WKWebView 工作?
这是我到目前为止所做的:
我尝试使用 Ionic WebView 插件(https://github.com/ionic-team/cordova-plugin-ionic-webview https://github.com/ionic-team/cordova-plugin-ionic-webview),虽然它适用于我的应用程序的某些部分,但它不适用于 iframe 页面。具体来说,我收到 Access-Control-Allow-Origin 标头包含无效值“null”。我使用 UIWebView 没有收到此错误。
将其添加到您的 config.xml 中
<allow-navigation href="*" />
然后构建你的ios平台
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)