News

Xamarin Details iOS Fix to 'Prevent App Store Rejection'

Microsoft published guidance for iOS mobile developers using Xamarin.Forms to avoid potential App Store rejection caused by the deprecation of Apple's UIWebView component.

The UIWebView component debuted in iOS 2.0 but was deprecated in iOS 8.0 in favor of the new-and-improved WKWebView.

After some warnings of the deprecation to developers, Apple on Dec. 23, 2019, advised: "The App Store will no longer accept new apps using UIWebView as of April 2020 and app updates using UIWebView as of December 2020." The company strongly encouraged developers to update to WKWebView "for improved security and reliability."

An issue on the topic was filed on the Xamarin.Forms GitHub repo way back in August 2019, and the Xamarin.Forms team just announced a fix.

It involves some technical machinations to get the iOS linker to work with Xamarin.Forms, which by default was ignored by the linker. The Xamarin.iOS team helped achieve that, but the functionality is hidden behind a feature flag for now until the team is sure everything works correctly.

Setting the Flag in Visual Studio for Mac
[Click on image for larger view.] Setting the Flag in Visual Studio for Mac (source: Microsoft).

In the meantime, to "Prevent App Store Rejection, Today!" developers using Xamarin.Forms are advised to:

  • Use the right versions of Xamarin.Forms and Xamarin.iOS.
  • Add a flag to the build configuration.
  • Build and submit your app to the App Store and celebrate!

"On the Xamarin.Forms side we also had to make some changes to make all this work correctly," said software engineer Gerald Versluis in a Feb. 10 blog post. "These new changes are part of Xamarin.Forms 4.5, including the pre-releases. Make sure that you are using the Forms 4.5 or newer NuGet package in your projects. You also need to make sure that you are using Xamarin.iOS 13.10.0.17. You can check this from Visual Studio. This version of Xamarin.iOS is included with Visual Studio for Mac 8.4.1 and Visual Studio 16.4.3 and up." Once all that is in order, a flag needs to be set (see figure above).

"This setting can be applied per build configuration so make sure that you put it in the right one. That will probably be the iPhone/Release build configuration which is typically used for distribution builds," said Versluis, who pointed to more information in the documentation.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

  • TypeScript Tops New JetBrains 'Language Promise Index'

    In its latest annual developer ecosystem report, JetBrains introduced a new "Language Promise Index" topped by Microsoft's TypeScript programming language.

Subscribe on YouTube