article31.10.20225 minutes

The Impact of .NET’s Release (and future .NET versions) for Xamarin’ Mobile Apps

  • Tech

Since its launch in 2022, Microsoft has been consistently rolling out updates to the .NET platform, starting with .NET 5 and progressing to the latest versions. This development marks a significant milestone for both C# and the entire .NET ecosystem. Over the past few years, there has been a clear trend within .NET towards creating a unified “.NET” framework that is versatile enough to run on any platform, in any environment, and for any purpose.

This resulted in a mandatory evolution for Xamarin – a multi-platform mobile development tool – to migrate to the .NET environment for the applications using this technology.

Our experts revisit the main benefits of transitioning to .NET and tell us about the necessary steps for the migration.

When to Migrate?

In August 2022, Microsoft made the announcement that support for Xamarin would be ending in May 2024. This timeline provides development teams with ample time to carefully plan and execute the migration process.

However, it's important to consider the broader context of this announcement, particularly the role played by the App Stores' requirements regarding operating system (OS) support. The latest versions of Android and iOS (Android 13 and iOS 16) will be the final versions supported by Xamarin. Based on past trends, it can be anticipated that the Apple App Store will require iOS 16 for app updates approximately 6 to 8 months after its public release, which aligns with the expected date of May 2024. With a similar history The Google Play Store might require Android 14 starting on August 31st, 2024, for any update.

In October 2023, however, Microsoft announced that they were adding support for the Android 14 and iOS 17 SDKs to Xamarin, though without extending the support period, which will end in May 2024 regardless. Knowing this, it might be technically possible to publish a Xamarin application until May 2025 for iOS and August 2025 for Android. However, we strongly recommend switching to .Net before May 2024 in order to continue to use an SDK that is still officially supported by Microsoft.

Source: Microsoft

How will Xamarin be migrated to .NET 8?

Mathieu Fillion, Manager of the development team at nventive, explains how the process can be set in motion: “To carry out the migration, we need to be particularly mindful of third-party libraries and of their availability in .NET. We also need to change a few details in .csproj files to cross to the ne .NET format. Since Xamarin. Essentials has now integrated the basic .NET library, you will need to replace the APIs with their new equivalents. Finally, you will need to compile everything, adjust the integration and continuous deployment pipelines, and do some tests to ensure everything works perfectly.

In terms of effort and timelines, the migration time will vary based on a number of parameters, including third-party libraries availability, and can range from several days to a few weeks.

Jean-Philippe Levesque, Team Lead, and his squad have just finished migrating the Tradezero app to .NET. “The client is extremely satisfied with the migration as they have already witnessed a performance improvement. On our end, we have successfully avoided technical debt by transitioning from Xamarin to the .NET environment.”

The Different Evolution Paths of .NET

Understanding .NET's history helps grasp its current state. Mono, Xamarin, .NET Core, and .NET 5 paved the way to a unified, open-sourced .NET framework that supports development for any machine.

The Main Benefits of Apps Developed on .NET

One of the main perks is the unification of the software development kit (SDK), the basic libraries and the runtime for mobile, desktop, IoT, web and Cloud applications. This unified approach in the .NET ecosystem offers several advantages:

  • Getting better performance: all the performance enhancements achieved in .NET Core, .NET 5, and .NET 6 are now automatically applied to the iOS and Android platforms. For example, Microsoft’s data shows that the launch time for an Android app in .NET 6 was twice as fast as with Xamarin compared to Xamarin.Android and Android .NET 6.

  • Simplifying the development process: Handling .NET is simpler. Indeed, the introduction of new language features in C# 10 reduces the quantity of code to write.

  • Enhance productivity: .NET and Visual Studio 2022 now provide developers with real-time code changes and instant visibility of applied changes.

By migrating from Xamarin to .NET, applications can benefit from improved performance and optimization gains.

*This article was updated on November 22, 2023.