iOS 上的 Xamarin 表单 UIWebView 弃用 [英] Xamarin Forms UIWebView Deprecation on iOS

查看:24
本文介绍了iOS 上的 Xamarin 表单 UIWebView 弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了以下文章中的建议:

I have followed advice from the following article:

https://devblogs.microsoft.com/xamarin/uiwebview-deprecation-xamarin-forms/

我正在使用以下正确版本:- Xamarin 表单 @ 4.6.0.726- Xamarin iOS @ 13.16.0.13

I am using the correct versions of: - Xamarin Forms @ 4.6.0.726 - Xamarin iOS @ 13.16.0.13

我已将 mTouch 参数中的标志设置为 --optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView

I have set the flag in the mTouch arguments as --optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView

我已将链接器设置为仅链接框架 SDK"

I have set the Linker to 'Link Framework SDKs Only'

但是我仍然收到来自 Apple 的电子邮件,说明 UIWebView 存在问题.

However I still receive the email from Apple stipulating the issue with UIWebView.

这让我相信我的代码仍然在某处引用了 UIWebView.

This leads me to believe that my code still has references to the UIWebView somewhere.

我为此 4 倍收到的警告 - 警告 MT1502:一个或多个对类型UIKit.UIWebView"的引用已存在于Xamarin.Forms.Platform.iOS,版本=2.0.0.0,文化=中性"中,链接前 PublicKeyToken=null'

The warnings I get for this 4x - Warning MT1502: One or more reference(s) to type 'UIKit.UIWebView' already exists inside 'Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' before linking

但我不知道如何继续查找然后删除这些引用.

But I don't know how to go ahead and find then remove these references.

请问有人可以提供一些帮助吗?

Please can somebody offer some help?

提前致谢!

推荐答案

似乎 --optimize=experimental-xforms-product-type 并没有从 Xamarin.Forms.Platform.iOS 中去除对 UIWebView 的引用.使用 --optimize=force-rejected-types-removal 时,它可以工作.我已提交给 Apple,但没有收到有关移除 UIWebView 的电子邮件.

It seems as though --optimize=experimental-xforms-product-type does not strip out references to UIWebView from Xamarin.Forms.Platform.iOS. When using --optimize=force-rejected-types-removal it works. I've submitted to Apple and I did not get the email about UIWebView removal.

这篇关于iOS 上的 Xamarin 表单 UIWebView 弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆