更新时间:2023-11-28 14:39:58
来自最新的 webView 的文档,WKWebView
替换了 UIWebView
自 Xamarin.forms 4.5
:
From the latest document of webView, WKWebView
has replaced UIWebView
since Xamarin.forms 4.5
:
从 2020 年 4 月开始,Apple 将拒绝仍然使用不推荐使用的 UIWebView API.虽然 Xamarin.Forms 已切换到WKWebView为默认,还有对旧SDK的引用在 Xamarin.Forms 二进制文件中.当前的 iOS 链接器行为没有删除它,因此不推荐使用的 UIWebView API 仍然会当您提交到应用程序时,似乎从您的应用程序中引用存储.
Starting in April 2020, Apple will reject apps that still use the deprecated UIWebView API. While Xamarin.Forms has switched to WKWebView as the default, there is still a reference to the older SDK in the Xamarin.Forms binaries. Current iOS linker behavior does not remove this, and as a result the deprecated UIWebView API will still appear to be referenced from your app when you submit to the App Store.
链接器的预览版本可用于解决此问题.到启用预览,您需要提供一个额外的参数--optimize=experimental-xforms-product-type 到链接器.
A preview version of the linker is available to fix this issue. To enable the preview, you will need to supply an additional argument --optimize=experimental-xforms-product-type to the linker.
此操作的先决条件是:
看看这个主题会有所帮助.
对于您的第一个问题,我认为 Xamarin.forms 4.5+ 中不再需要它.
For your first question, I think it is no longer needed in Xamarin.forms 4.5+.
关于你的第二个问题,如果你有任何问题,你可以在 Xamarin.forms 的 Github 中打开一个问题.
For your second question, if you have any question, you can open an issue in Github of Xamarin.forms.