question

BlakeNong-3599 avatar image
0 Votes"
BlakeNong-3599 asked ColeXia-MSFT edited

UIWebView referenced in Xamarin.iOS project

Hi all,

I'm trying to publish my app to App Store and I got the rejection Apple about the deprecation of UIWebView. I cleaned up all the UIWebView reference in my code but looks like there are some nuget libs are still referencing to UIWebView as following.

FBLPromises
GTMSessionFetcher
GoogleAPIClientForREST
GoogleToolboxForMac
GoogleUtilities
Protobuf
leveldb
libSkiaSharp
nanopb

Could you please help how to resolve these issues?

Thanks & best regards,

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered ColeXia-MSFT edited

Hello,

Welcome to Microsoft Q&A!

  • The best solution : Start by updating your external dependencies to their latest versions since this situation might already be solved in a newer release. If not, contact the maintainer(s) of the libraries and ask about their update plans , or replace the libraries totally.

  • Alternatively , if you're using Xamarin.Forms , enable the managed linker (on the whole project or, at least, on the dependency using UIWebView) so it might be removed, if not referenced. That will solve the problem but might required additional work to make your code linker-safe.

  • A forceful solution is to add --optimize=force-rejected-types-removal to your project's Additional mtouch arguments. This will remove traces of UIWebView from the application. However, any code that refers to the type will not work properly (expect exceptions or crashes).

Refer to docs : https://docs.microsoft.com/en-us/xamarin/ios/user-interface/controls/webview#removal.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.