Xamarin Discontinued: What This Means for App Developers

Xamarin is predominantly used for cross-platform mobile application development. It allows developers to create mobile apps that can run across multiple platforms including Android, iOS and Windows all using a single piece of code. In 2023, Microsoft announced Xamarin was going end of support as of May 2024.

Xamarin Discontinued: What This Means for App Developers

Xamarin is predominantly used for cross-platform mobile application development. It allows developers to create mobile apps that can run across multiple platforms including Android, iOS and Windows all using a single piece of code. In 2023, Microsoft announced Xamarin was going end of support as of May 2024.

 

Introduction

Xamarin is a Microsoft technology, predominantly used for cross-platform mobile application development. It allows developers to create mobile apps that can run across multiple platforms including Android, iOS and Windows all using a single piece of code. In 2023, Microsoft announced Xamarin was going end of support as of May 2024. Here, we discuss what this means for Xamarin Developers and explore the alternatives that are out there.

Typical Xamarin Development Process

Project Setup - 

Create a new Xamarin project in either Visual Studio or Visual Studio for Mac, choosing the approproate project template based on the relevant target platforms - iOS, Android or both.

User Interface design - 

Design the user interface using Xamarin forms or Xamarin native depending on the required level of cross platform code sharing and considering the customisation required for each specific platform.

Coding -

Write the application logic using C# whilst incorporating the Xamarin APIs. Xamarin.Forms should then be used for shared UI features across platforms or Xamarin.Native for platform-specific UI elements.

Testing -

Perform individual unit testing, UI testing as well as device specific testing to ensure the application is functioning as desired on all of the devices and platforms it may be used on.

Debugging -

When bugs are identified during the testing phase the application should be debugged using the debugging tools available in Xamarin and the IDE (integrated development environment).

Optimisation -

The code and User Interface should then be optimised to allow for peak performance taking into account platform-specific considerations.

Deployment -

The application is now ready for deployment and should be packaged to the respective app stores - Apple App Store, Google Play Store or both.

CI/CD (Continuous Integration/Continuous Deployment):

Implement CI/CD pipelines to automate the build, testing and deployment workflows.

Monitoring and Updates:

Monitor the applications performance and user feedback and release updates when required to address issues, debug or add new features.

Support for Xamarin

Xamarin, as with every Microsoft product has a lifecycle. The lifecycle begins when a product is first released and ends when support is no longer offered. As of May 1st 2024, official support for Xamarin ended. 

Xamarin & Xamarin.Forms End of Support

Xamarin.Android, Xamarin.iOS, Xamarin.Mac have been directly integrated into .NET as Android, iOS, and Mac for .NET. If you currently are building with these project types, they should be upgraded to .NET SDK-style projects to allow for on-going support.

Xamarin.Forms has developed into .NET MAUI (Multi-platform App UI). This means that existing Xamarin.Forms projects should be migrated to .NET MAUI as an alternative to Xamarin.

Xamarin support will end on 1st May 2024 for all Xamarin SDKs including Xamarin.Forms. Android API 34 and Xcode 15 SDKs (iOS and iPadOS 17, macOS 14) will be the final versions Xamarin will target from existing Xamarin SDKs, after this, no new APIs are planned or scheduled.

For more information about upgrading your Xamarin projects or application to .NET, get in touch with us today.

*End of support refers to the date when Microsoft will no longer provide fixes, updates or technical assistance. It is imperative that you make sure you have the latest available update installed as we approach this date. Without support, you'll no longer receive security updates that can help protect your machine from harmful viruses, spyware and other malicious software. Performance may also become degraded and functionality no longer work.

New MAUI (Multi-platform App UI)

.NET MAUI is hailed by Microsoft as the evolution of mobile-centric Xamarin.Forms and subsequently, it's 'successor'. MAUI offers enhanced features and functionality and allow developers to create desktop apps.

Unlike Xamarin.Forms which don't have native desktop support, .NET MAUI provides native support for macOS and Windows - it does NOT provide native support for Linux. This offers developers the ability to build cross-platform desktop applications without the need for writing separate applications for the respective platforms also known as 'Code Sharing'. The architecture underpinning .NET MAUI is also more up to date.

Microsoft has provided extensive tooling and support for migrating Xamarin Projects to MAUI. You can find a step-by-step guide here.

Open Source/Community Driven Development

Xamarin is an 'Open-Source' platform. This means that certain components of Xamarin are open to the public to view, use, modify and also contribute to. It is important to note that Xamarin is not fully open source but some of its key segments are.

Xamarin.Forms - Xamarin.Forms is a User Interface toolkit which enables developers to build cross-platform applications and is a component of Xamarin that is open source. Developers can access the source code, contribute to its development and customise it according to their specific requirements.

The Xamarin.Forms repository is accessible via GitHub which allows the community to contribute to it's improvement.

Xamarin Community Toolkit -  This is another open source component that expands Xamarin.Forms and has additional controls and functionalities. It allows developers to contribute to its development in a collaborative manner.

The Xamarin Community Toolkit is also accessed via GitHub.

Mono - Xamarin uses Mono runtime to execute C# on multiple platforms, this too, is open source although it is not exclusive to Xamarin. Mono is an open source implementation of the .NET framework.

Developers interested in contributing to, using or exploring the source code of Xamarins open source components should visit the respective GitHub repositories. Here, they can actively participate in the community driven development process. 

Microsoft Announcement

Microsoft announced in December 2023 that Xamarin.Android, Xamarin.iOS, Xamarin.Mac are now integrated directly into .NET (starting with .NET 6) as Android, iOS, and Mac for .NET.

Xamarin.Forms has evolved into .NET Multi-platform App UI (MAUI) and existing Xamarin.Forms projects should be migrated to .NET MAUI.

Xamarin support will end on May 1, 2024 for all Xamarin SDKs including Xamarin.Forms. Android API 34 and Xcode 15 SDKs (iOS and iPadOS 17, macOS 14) will be the final versions Xamarin will target from existing Xamarin SDKs (i.e. no new APIs are planned).

You can view the full article from Microsoft here.

Key Differences between Xamarin and .NET MAUI

Project Structure

Xamarin.Forms and .NET MAUI have different project structures. Xamarin developers have to work with multiple projects that target multiple platforms which can be time consuming and complex.

Xamarin developers often also find it difficult to keep images, fonts, and platform-related code organised and consistent. .NET MAUI has addressed these issues by allowing developers to work on a single project and deploy it across multiple platforms.

The.NET MAUI application contains a Platforms subfolder which includes subfolders for Android, iOS Maccatalyst and Windows.

This folder can be used to target the relevant code for each platform, needed to launch the app. 

Architecture

The architecture of Xamarin.Forms and .NET MAUI have significant differences.

Xamarin.Forms take a page based architectural approach that uses pages, views & controls to create the application's user interface. Conversely, .NET MAUI has a much more flexible architecture based upon a single or parent view root that can contain multiple child views.

Platform Specific APIs

As detailed above, Xamarin.Forms offer a set of cross platform APIs for Windows, Android and iOS although platform-specific APIs are not available on all platforms or may require custom renderers.

On the other hand, .NET MAUI provides a collection of platform specific interfaces that gives developers the ability to access native functionality from each platform directly.

Code Sharing Across Platforms

Xamarin.Forms enable code sharing across multiple platforms although some platform specific code may need to be written. With .NET MAUI, Developers can easily exchange code between platforms

Development Environment

Xamarin.Forms are compatible with Visual Studio and Visual Studio for Mac but they do require Xamarin Studio to be installed for them to work. There are no additional tools or extensions required for .NET MAUI.

Themes

Xamarin.Forms allow developers to use custom themes in order to customise their applications although the theming system can be complex to understand.

.NET MAUI offers a simplified theming system to make it easier for developers to create and apply their own, customised themes.

Design-Time Data

Whilst Xamarin.Forms allow you to preview the layout of an app without having to actually run it, .NET MAUI allows developers to create design time data and use it in parallel with live data. This makes it easier to test different scenarios during development and identify and address potential issues earlier.

Desktop Support

Xamarin.Forms do not have native desktop support although external third party tools such as Electron can run applications. .NET MAUI does offer native support for Windows, MacOS and Linux which provides developers the ability to build cross platform desktop applications.

Performance

Xamarin.Forms' performance has been heavily criticised, particularly on the Android platform. .NET MAUI has addressed this issue with a new renderer that increases performance on all platforms. Applications are quicker, more fluid and more responsive as a results of this.

How Can We Help?

Our developers have masses of experience working with Xamarin as well as .NET and technologies in the wider Microsoft ecosystem so we are well placed to evaluate your options and help you make the appropriate changes in preparation for the end of support for Xamarin.

Prefer to Call or Email Us?

If you dont like filling in these forms, or you would prefer to speak on the phone or via email then please use one of the below:

0115 772 2751
[email protected]

Follow us on Social Media

Follow us on Twitter, Facebook or LinkedIn to be kept up-to-date with Cool Code Company news and goings-on, or just to have a conversation with us.