Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Forms UIWebView Deprecation on iOS

I have followed advice from the following article:

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

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

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

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

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

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

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?

Thanks in advance!

like image 202
Sach K Avatar asked May 07 '20 16:05

Sach K


People also ask

Is UIWebView deprecated?

As of iOS 12.0, 'UIWebView' has been explicitly marked as deprecated. Apple is encouraging developers to adopt WKWebView instead, which was introduced in iOS 8.0.

Is xamarin forms deprecated?

Forms, a major component of its mobile app development framework, would be deprecated in November 2021 in favour of a new . Net based product called MAUI - Multiform App User Interface.

What is UIWebView in iOS?

What is UIWebView? UIWebView is a deprecated iOS user interface control in Apple's UIKit framework. It loads HTML files and web content into an app view, rendering them as they would appear in a browser window.

What is the difference between UIWebView and WKWebView?

Unlike UIWebView, which does not support server authentication challenges, WKWebView does. In practical terms, this means that when using WKWebView, you can enter site credentials for password-protected websites.


1 Answers

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.

like image 188
Sach K Avatar answered Oct 22 '22 12:10

Sach K