One or more reference(s) to type 'UIKit.UIWebView' still exists inside 'Xamarin.Forms.Platform.iOS

Oleksandr Savchuk 1 Reputation point
2020-12-18T15:31:07.127+00:00

Hello,

I'm working on a fix for our Xamarin application to prevent blocking due to UIWebView deprecation.
Before the start I had tried to add --warn-on-type-ref=UIKit.UIWebView and build. So, "warning MT1503: One or more reference(s) to type 'UIKit.UIWebView' still exists inside 'Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' after linking" was displayed three times.
And each time I was uploading a new bundle to the app store test flight I received an email notification "We identified one or more issues with a recent delivery for your app"

I've done the next steps:

  1. Updated to Xamarin.Forms 4.6
  2. Added mtouch arguments into build configuration --optimize=experimental-xforms-product-type
  3. Replaced all occurrences of UIWebView by WkWebView inside our own code
  4. Updated third-party SDK to the last version (I used grep -r UIWebView to detect which one I should update)

After all these steps, one occurrence of "warning MT1503" is still displaying when I build. But I haven’t received a warning email when uploading a new bundle

I've read somewhere on forums that --warn-on-type-ref=UIKit.UIWebView can give false-positive results.

So, the main question is how I can be sure that our app meets all apple requirements and won't block during the next release?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,316 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Oleksandr Savchuk 1 Reputation point
    2021-02-15T08:20:57.373+00:00

    Thanks for answering.

    I build on my workstation in Visual Studio, using the latest mono and Xamarin.iOS.
    I've tried to release and the app has successfully passed the AppStore checks.

    So looks like warnings were false-positive in my case.

    0 comments No comments