9

Fall 2022 Updates for Xamarin, Hello iOS 16 and Android 13

 1 year ago
source link: https://devblogs.microsoft.com/xamarin/xamarin-ios-16-android-13-updates/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Fall 2022 Updates for Xamarin, Hello iOS 16 and Android 13

Screen-Shot-2017-01-03-at-3.35.53-PM-150x150.png

David Ortinau

September 27th, 20220 2

Today we are happy to announce that Xamarin support is now available for iOS 16 in Visual Studio 17.3.5 on Windows and 17.3.6 on Mac. iOS 16 now joins Android 13 (API 33) in Xamarin to support the latest mobile versions on both platforms. iOS 16 is part of the larger Xcode 14 release from Apple which will soon also add new versions of iPadOS, tvOS, macOS, and Mac Catalyst. Apple has not yet released those updates, so your applications will continue to work using the existing versions of those SDKs. To get started today, install these versions of Visual Studio along with Xcode 14 on your Mac.

If you are using .NET 6 or the newly released .NET 7 release candidate, we advise you to keep Xcode 13 and Xcode 14 installed side-by-side. In a near future release, we will ship Xcode 14 support for .NET 6 and 7 at which time everything will work with Xcode 14.

Xamarin Support Update

During the recent .NET Conf Focus on MAUI event in early August, we shared an updated roadmap that details the support transition from Xamarin to .NET. We are happy to be able to provide you with seamless support during your transition from Xamarin to .NET MAUI through May 1, 2024. We are also smoothing the technical transition for you. Due to the external dependencies on Apple and Google for Xamarin and .NET MAUI, the support story is a bit more nuanced than for the .NET SDK and runtime itself. Let’s break down the timeline and I’ll show you the path ahead for your projects.

Xamarin SDKs will be supported through May 1, 2024, with the final platform versions being Android 13 and iOS 16. All project code can be upgraded to .NET 6 and beyond without rewriting your apps.

About Xamarin.Android and Xamarin.iOS

These mobile SDKs are the foundation of .NET for mobile! In .NET 6 we unified them with the rest of .NET on the same base class library (BCL) including C# types (iOS had some overlap) and running on the same runtime. It’s all there for you in .NET 6 and will continue as (part of) .NET!

We have shipped Android 13 and iOS 16. These are the final platform versions we will support for Xamarin. Subsequent versions of Android and iOS will be released in .NET. Before then, we highly recommend you complete your transition.

Consider that Apple historically releases new major versions in September, and the Apple App Store immediately requires new apps to use the latest version, and by April of the following year requires all apps to be built with the latest version. Google is a bit more generous with its policy, but it also has an end.

When it comes to mobile apps especially, make sure you quickly adopt the latest versions in order to stay compliant, performant, and secure.

Upgrading to .NET 6: Android and iOS

In order to upgrade your Xamarin.Android and Xamarin.iOS projects to .NET you will first update to the SDK Style project system (i.e. update your csproj) and then update your dependencies to .NET 6 compatible versions. For most applications, that’s the beginning and the end of the journey – compile and test your apps. You don’t need to change namespaces or rewrite these apps.

Checklist:

  • Update your csproj to SDK Style
  • Upgrade or replace incompatible dependencies with .NET 6 versions
  • Compile and test your app

About Xamarin.Forms

Xamarin.Forms has been renamed to .NET MAUI and gives you all the same code sharing and productivity you’ve enjoyed for years, plus new desktop platforms, Blazor components, and simpler coding patterns. Your Xamarin.Forms projects also upgrade to .NET MAUI without rewriting them! Here are a few additional considerations and things to be aware of as you plan.

  • You do not need to rewrite your code, even custom renderers
  • Moving to single project is optional
  • .NET Upgrade Assistant is a work-in-progress and optional
  • Xamarin.Essentials is now part of .NET MAUI
  • Visual Studio 2022 17.3 on Windows includes .NET MAUI, and .NET MAUI tooling is in preview 17.4 on macOS

Upgrading to .NET 6: Xamarin.Forms

Very little has changed in .NET 6 for Android and iOS since they are .NET bindings of the SDKs shipped by Google and Apple. Xamarin.Forms is where we have added on productivity, patterns, layouts, and controls to enhance your cross-platform mobile experiences. .NET MAUI is Xamarin.Forms renamed, and improves upon Xamarin.Forms for performance, extensibility of layouts and controls, consistency and reliability, and exanded reach for your apps to desktop. All this and much more has been added to your development experience in .NET MAUI, so what does it take to migrate your project?

Checklist

  • Update your csproj to SDK Style*
  • Update Xamarin.Forms namespaces in C# and XAML* – Documentation
  • Update code for major version breaking changes* – Documentation
  • Upgrade or replace incompatible dependencies with .NET 6 versions* – Documentation
  • Compile and test your app
  • Touch-up layout and styling

*Our migration guide documents how .NET Upgrade Assistant can help with these items, and how you can do them manually.

About Others

Xamarin developers have also been able to use Xamarin SDKs to target more than just mobile, sometimes because they “just work” when we ship the mobile SDKs and tooling. What of those continue to be available to you .NET?

  • Apple: App Extensions, CarPlay, tvOS
  • Google: Android Auto, Android Wear

Support Timeline

Each release of .NET MAUI (including the platform SDK dependencies for Android, iOS, etc.) will follow the same support policy and shipping schedule as defined on the official support policy page.

Support Timeline

Each release of .NET MAUI is scheduled to coincide with .NET SDK on the annual cadence with monthly servicing opportunities. Support for .NET MAUI will always end 6 months after the next release. For more details, refer to the the official support policy.

Conclusion

We are often asked “how long should it take to upgrade an application to .NET 6”, and (as usual) the answer is “it depends”. To get most projects setup, building, and debugging can take a day or less. The usual tasks that slow this process down are .NET 6 incompatible 3rd party dependencies that you will either upgrade, replace, or remove.

We are excited for the future of .NET for building client applications! Please let us know how you get along with your upgrades from Xamarin, and how we can improve your experience by emailing me [email protected] or by opening an issue for us on GitHub.

David Ortinau Principal Product Manager, .NET Multi-platform App UI

Follow


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK