Build together, debug together. Join the community on Discord.→

Uno Platform 4.2 – .NET 6 Mobile RC1, Perf Boost, 190+ Improvements

.NET 6 Mobile RC1 Support

As of last week’s release of .NET 6 Mobile RC1, Uno Platform is now following the updates to ensure that you have access to the latest features provided by the .NET runtime.

As per Microsoft’s announcement, the .NET 6 Mobile APIs are now considered stable for iOS, Android, and Mac Catalyst. This enables applications and libraries to be developed without having to deal with any breaking changes in future .NET Mobile releases. As Uno Platform takes a dependency on dotnet runtime, this is important as we can stabilize our own support for iOS, Android and mac Catalyst targets.

Since our previous release about six weeks ago, we also made a batch of changes to fix the support for localization of iOS, macOS and Catalyst apps, based on the new behaviors of .NET 6. In total there were over 190 new features and fixes completed, around Geolocation, focus and keyboard management, Android/Skia/WebAssembly performance, and more. For those who like stats – that’s about 6 closed PRs per business day; we are definitely picking up velocity even more.

As always, to upgrade to the latest bits and use .NET 6 Uno Platform app templates, you’ll need to use uno-check. You can find up-to-date information about uno-check in our docs.

To install Uno-check:

				
					dotnet tool install -g uno.check
				
			

To update Uno-check if you had it installed already

				
					dotnet tool update -g uno.check
				
			

You can then run it with:

				
					uno-check --pre
				
			

If you were already using Uno 4.1, had run uno-check and were using VS 17.2 preview 3 or earlier , upgrading to 17.2 Preview 4 will cause mobile workloads to become desynchronized. To fix your environment, you’ll need to run the following command:

				
					dotnet workload install ios android maccatalyst macos --from-rollback-
file https://aka.ms/dotnet/maui/rc.1.json --source 
https://aka.ms/dotnet6/nuget/index.json --source
https://api.nuget.org/v3/index.json
				
			

Finally, you’ll probably notice that uno-check is code-signed, making the windows elevation popup less scary for new users, and help with more recent Windows Smart Screen filtering.

Visual Studio 2022 17.2 Preview 4 Support

We’re also continuing to make improvements to our extension, namely improving intellisense support. XAML Intellisense is now enabled for Skia.Gtk, Skia.Wpf and WebAssembly projects, as well as fixing the cursor moving to the beginning of the document when closing XAML element tags.

We still have integration work to do to ensure that additional scenarios are working properly, yet this change will make developer’s life easier.

Skia+GTK OpenGL Renderer

Skia supports multiple render modes, and Uno Platform has been using software rendering since the Skia+Gtk backend was added to Uno. While this mode is the safest to run on all platforms, it is also the slowest. For instance, rendering a full screen window on a 4K screen can take about 250ms.

The new render mode we’re introducing is using the OpenGL backend, where the full rendering of the window is done through available hardware acceleration. This way, the rendering of the window on the same 4K screen is brought down to about 2ms, making the application feel a lot smoother and consume less resources.

This new render mode is available for the Skia+Gtk head when running on Windows and Linux, and can be controlled using the GtkHost.RenderSurfaceType property.

Performance Updates

In the 4.1 release, we added the support for layout Measure pass dirty path optimization for WebAssembly and Skia backends, giving to interesting performance improvements.

This time around, we spent some time with the Arrange pass dirty path for WebAssembly and Skia, as well as enabling Measure path caching for Android. This last update avoids spending time in the Android interop layers while performing the measure path operations, resulting in smoother UI updates.

The Arrange pass dirty path improvement is quite interesting as it allows the layout engine to skip HTML DOM manipulations on WebAssembly, a significant portion of the layout process. We’ve noticed improvements of around 70% in some layout update scenarios. Interestingly, the more complex the UI is, the bigger the improvement will be.

We are now measuring performance of our latest release and comparing it with previous releases. We will report these numbers shortly as soon as we have had time to examine them and make further performance optimizations. But the early numbers look promising – stay tuned!

Other Updates

  • Support x:Bind for Static event handlers
  • `ElevatedView` on Skia backends
  • Focus States on SelectorItem and FlipView
  • TextBox.SelectedText support
  • Enhanced keyboard navigation on ComboBox
  • BringIntoViewOptions/BringIntoViewRequested support
  • ListView support for IIncrementalLoading (Skia, WebAssembly)
  • Updated API surface to match Windows SDK 22000
  • MessageDialog support on WASM and Skia

Contributor Highlights

We’d also like to thank the community contributors for this release:

Next Steps

If you are new to Uno Platform, the best way to get started is to follow our official getting started guide. Before you get started, make sure you’ve prepared your dev environment for Uno Platform app development.

The tutorial walks you through creating a small multi-platform application with Uno Platform and how to run your applications on all platforms supported by Uno Platform.

Tags:

Share this post:

Uno Platform 5.2 LIVE Webinar – Today at 3 PM EST – Watch