Profile Guided AOT in Uno Platform reduces package size by 50%

We’re pleased to announce the support for .NET Profile Guided AOT (PG-AOT) for the Uno Platform, which allows the creation of faster and smaller apps. When compared with the Full AOT support we’ve added support for last year, the package size is cut in half. It provides better performance with the Mixed Mode support we announced support for earlier by making a smarter use of the IL Interpreter. We’ve updated the Uno Calculator, the Uno Playground, the XAML Controls Gallery, the RayTracer benchmark and the Roslyn Quoter applications using PG-AOT. These size improvements allow for these apps to run on Safari for iOS. About Uno Platform For those new to Uno Platform – it enables for creation of single-source C# and XAML apps which run natively on iOS and Android, macOS and Web via WebAssembly. Uno Platform is Open Source (Apache 2.0) and available on GitHub. To learn more about Uno Platform, see how it works, or create a small sample app. What is .NET AOT ? The .NET runtime supports three modes of execution: Interpreter, where the .NET assemblies are executed IL opcode by opcode using a WebAssembly compiled interpreter, as WebAssembly does not yet support JIT (Just in Time) compilation.

Announcing Uno Platform 3.0 – Support for WinUI 3.0 Preview 1

Today, the Uno Platform is adding support for WinUI 3.0 Preview, alongside WinUI 2/UWP and later. This allows applications to use newer APIs from Microsoft and create cross platforms apps. We’ve worked closely together with the WinUI team in order to be able to bring you Uno Platform 3.0 release at the same time WinUI 3.0 Preview 1 is being announced at Microsoft Build 2020 conference. With the approach of keeping both API sets active with two nuget packages (Uno.UI and Uno.WinUI), we’re making sure that we’re not breaking existing applications, while enabling experiments with WinUI 3.0 Preview 1. About Uno Platform For those new to Uno Platform – it enables for creation of single-source C# and XAML apps which run natively on iOS, Android, macOS and Web via WebAssembly. (or #WinUIEverywhere). Uno Platform is Open Source (Apache 2.0) and available on GitHub. To learn more about Uno Platform, see how it works, or create a small sample app. Sample Uno Platform App with Source Code – Ch9 To showcase the power of WinUI and Uno Platform in a cross-platform setup, we created a small app which consumes videos from publicly available Channel 9 RSS feed – about 40 most recent videos

Uno Platform 3.0 Preview 1 Announced (Press Release)

Uno Platform 3.0 Preview 1 Announced The new release enables WinUI 3.0 Preview 1 applications to run on iOS, Android, Web and macOS. We are pleased to announce the general availability of Uno Platform 3.0 Preview 1. The new release enables software developers to reuse the same code from their WinUI 3.0 Preview 1 – built applications and take them cross-platform to iOS, Android, Web and macOS by using Uno Platform. In turn, the code reuse produces great time savings as only single code-base needs to be developed and maintained, as opposed to five separate ones. Uno Platform team believes the Windows 10 development platform provides the most productive developer experiences, as well as the most delightful end-user applications. The time-tested security and application models as well as accessibility standards enable developers to simply leverage past investments made and to focus at implementing the business case at hand. WinUI is the modern native UI platform of Windows which makes it easy to build modern, seamless UIs that feel natural to use on Windows devices. And with Uno Platform those very same experiences can be taken to iOS, Android, macOS and Web (WebAssembly). “We are delighted to see WinUI 3 reach

Introduction to Uno Platform course launches on Udemy

We are pleased to announce one of our community champions Christian Findlay has published the first course of his Uno Platform curiculum on Udemy. This is a great way to get started with Uno Platform after you’ve gotten your first steps via our official Getting Started guide.   Add to Udemy Wish List Now. You can add to the course to your Udemy Wishlist now – and you will not need to pay for it until the course is released and you are ready to take it. Learn to build single-source apps for WebAssembly, Mobile, and Desktop Apps with C#. Uno Platform allows you to write once and deploy on any of these platforms. The course walks you through a simple UI scenario and shows you how to build a single-source app that runs on all the mentioned platforms.   Course Outline     More modules will be released in weeks after the course introduction. You can add to Wishlist now – and you will not need to pay until the course is released and you are ready to take it. Uno Platform Team

Announcing Uno Platform 2.4 – macOS support and Windows Calculator on macOS

Hello macOS! Developer productivity and code reuse is at the heart of Uno Platform mission. Today we are adding macOS support preview and we are one step closer to achieving #WinUIEverywhere mission, enabling WinUI and your C# and XAML code to run on Windows, iOS, Android, Web, and now macOS. macOS support was one of the top requested Uno Platform feature in surveys we did. We are glad to deliver on that key ask and to continue to develop it in the open together with you. Today, when you create a new Uno Platform solution a new head project for macOS will automatically be created for you. Windows Calculator on macOS Previously, as a proof of concept for the level of code reusability you can achieve across mobile and the web, we had ported the open source Windows Calculator to Android, iOS and the Web, and published it as the Uno Calculator. Today, as a showcase of macOS support published in the macOS App Store, we are extending that example to also include macOS. How to enable your existing Uno app to run on macOS If you already have an Uno application and you want to add support for macOS,

Announcing Uno Platform 2.3 – Android 10, Android X, WinUI and more!

  The wait is over! Uno.UI for Android now supports compilation for API level 29 (Android 10). It is now possible to use all the new APIs available like the new location permissions and improvements to the Biometry and foldables support.   Using the API level 29 allowed us to review our TextBlock implementation for Android and use official APIs now available to replace some reflection code required to access hidden APIs for MaxLines. While being safer going forward, this approach also provides performance gains for this crucial control. Applications have only 1 or 2 TextBlocks right? 🙂 Exit Android Support Libraries, Welcome Android X Like all Android and Xamarin developers before, we were using the Android Support Libraries. Those packages can sometimes cause developers some headaches but they achieve a pretty awesome feat. Among other things, they allow us to use new features on devices running older Android versions. The Android team started a huge refactor to break those libraries into even smaller pieces, now called Android X (or JetPack) and then the Xamarin team released their stable bindings for them last February. Logically, we had to migrate Uno to them! Shout out to the Xamarin team, their migration tooling worked

INotifyPropertyChanged with C# 9.0 Source Generators

Credit: This article originally appeared at, written by Jerome Laban. In a design meeting far, far away, source generators were designed to be part of C# 6.0, but sadly never came to be. At the time, wanting that source generation feature pretty badly, I went on implementing the specification which later became Uno.SourceGeneration, and it turns out it was the right decision to stick with a very similar API. I could port the INotifyPropertyChanged (INPC) generator I built a while back that uses Uno.SourceGeneration package, convert it to use Roslyn’s shiny new C# 9.0 feature in a matter of minutes. Amazing! The INPC Generator As a quick refresher, the generator works by allowing the creation of a class this way: partial class MyClass { [GeneratedProperty] private string _myProperty; partial void OnMyPropertyChanged(string previousValue, string newValue) { Console.WriteLine($”OnMyPropertyChanged({previousValue}, {newValue}”); } } You’ll notice here that the property is not visible at all, and it will be assumed that the generator will recognize the GeneratedPropertyAttribute and do the rest of the work for the author of the class. The generator could then produce something like this: partial class MyClass : INotifyPropertyChanged { public string MyProperty { get => _myProperty; set { var

How we got 14% performance boost to Uno Platform 2.2 over 2.1 release

  The performance improvements made in Uno Platform 2.2 when compared with 2.1 are spread across multiple categories: Memory pressure, with 40% of arrays reuse try/finally optimizations for WebAssembly, with 10x improvements GC Handles pressure, with 2.8x over reusing handles JavaScript tweaking, ranging with 20% and 10x faster operations Finalizers cost, with 4x improvement in objects creation UP NEXT IN 2/3 : Last night we tweeted about a WebAssembly improvement which we believe will give further 35% boost to interpreted mode performance. We will include this improvement in Uno Platform 2.3 or later. For the Windows Community Toolkit DataGrid, this translates to a 14% increase in load time performance under WebAssembly. We’ve been looking at performance in order to optimize runtime performance for all platforms, and in particular for WebAssembly. There are lots left analyze in different parts of the framework to enhance the experience for the DataGrid, specifically. Memory Pressure Updates (40% of array reuse) Memory pressure is an important part of the performance characteristics, and in recent iterations of the .NET BCL, the System.Memory package has provided many tools to help. One of tool is the ArrayPool class, which allows the renting and releasing of arrays of at

UWP, WinUI and Uno Platform get Prism support thanks to Uno team OSS Contribution

We are pleased to announce that Uno Platform team has provided the initial support for the Prism library.   Background The Prism Library was initially created by Microsoft’s Patterns and Practices team in 2008 and had grown into a mature set of guidance that allows developers to use proven patterns and development practices to create XAML based applications. In 2015, as Microsoft forged more into the world of open source, the Prism library was taken over by community champions and has been evolved since. Currently the initiative is led by Brian Lagunas and Dan Siegel, both Microsoft MVPs. Fast forward to 2020 One of the most requested improvements to Prism has been support for UWP (and future WinUI) with hundreds of conversations on the topic were had on twitter, email and forums. However, this was a behemoth task for the sole two main maintainers of the library. As Uno Platform has been championing UWP/WinUI on a mission to take WinUI cross-platform to iOS, Android, WebAssembly and macOS, our team stepped up to the plate and created the initial support. Uno Team is committed to providing ongoing support to the library. A bit about implementation With this contribution, the Prism supported