如何解决Cordova ITMS-90809:不推荐使用的 API 使用 - 不再接受使用 UIWebView 的新应用程序
尝试将我的应用发送到应用商店时,我收到以下消息: ITMS-90809:不推荐使用的 API 使用 - 不再接受使用 UIWebView 的新应用程序。相反,使用 WKWebView 来提高安全性和可靠性。了解详情 (https://developer.apple.com/documentation/uikit/uiwebview)。
但我的模拟器日志显示
2021-05-21 14:05:47.333578-0300 xxx[21780:432427] CDVWKWebViewEngine will reload WKWebView if required on resume
**2021-05-21 14:05:47.333667-0300 xxx[21780:432427] Using WKWebView**
2021-05-21 14:05:47.333880-0300 xxx[21780:432427] [CDVTimer][console] 0.035048ms
2021-05-21 14:05:47.334027-0300 xxx[21780:432427] [CDVTimer][handleopenurl] 0.043988ms
2021-05-21 14:05:47.334811-0300 xxx[21780:432427] Unlimited access to network resources
2021-05-21 14:05:47.334912-0300 xxx[21780:432427] [CDVTimer][intentandnavigationfilter] 0.808954ms
2021-05-21 14:05:47.335034-0300 xxx[21780:432427] [CDVTimer][gesturehandler] 0.040054ms
2021-05-21 14:05:47.335149-0300 xxx[21780:432427] WARNING: NativeXHR is allowing untrusted certificates due to preference AllowUntrustedCerts=on
2021-05-21 14:05:47.335628-0300 xxx[21780:432427] [CDVTimer][cdvwkwebviewfilexhr] 0.518084ms
2021-05-21 14:05:47.335701-0300 xxx[21780:432427] [CDVTimer][TotalPluginStartup] 1.880050ms
2021-05-21 14:05:47.447104-0300 xxx[21780:432427] WF: === Starting WebFilter logging for process xxx
2021-05-21 14:05:47.447297-0300 xxx[21780:432427] WF: _userSettingsForUser : (null)
2021-05-21 14:05:47.447437-0300 xxx[21780:432427] WF: _WebFilterIsActive returning: NO
我已经尝试更新我的插件,插件列表是:
cordova-plugin-cleartext 1.0.0 "CordovaPluginsCleartext"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-wkwebview-engine 1.2.2 "Cordova WKWebView Engine"
cordova-plugin-wkwebview-file-xhr 3.0.0 "Cordova WKWebView File XHR Plugin"
cordova-sqlite-storage 6.0.0 "Cordova SQLite storage plugin - cordova-sqlite-storage plugin version"
也尝试将 wkwebview 添加到 config.xml。
还有什么我可以研究的吗?
谢谢!
解决方法
Cordova 已经弃用了 WKWebView 的用法。因此,为了解决这些问题和未来的问题,请将cordova 版本更新为10,将android/ios 项目更新为最新版本。
安卓 9.1 IOS 6.2
以下是弃用消息:https://cordova.apache.org/2021/02/07/deprecate-wkwebview-engine.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。