Uno Platform v2.4.0 Release Notes

Release Date: 2020-05-15 // almost 4 years ago
  • ๐Ÿš€ This exciting new release is all about enabling development on macOS and making apps for macOS!

    ๐ŸŽ We've been working on this for a while now, and with the help of contributors (thanks @MartinZikmund!), we're now announcing the preview of Uno's macOS support.

    ๐ŸŽ To validate that our macOS support is taking shape, we ported over the Uno Calculator over, and it's now available on the mac App Store.

    ๐ŸŽ There are lots to do to get to the full potential of macOS through Uno's abstractions, yet it will allow you to start developing for macOS.

    To create a new application with Uno in Visual Studio for mac:

    Open a terminal

    Type the following to install the Uno templates:
    dotnet new -i Uno.ProjectTemplates.Dotnet::2.4

    Type the following to create a new project:
    dotnet new unoapp -n MyUnoApp

    Open the project in Visual Studio

    ๐Ÿ— To build for each platform:

    ๐ŸŽ For macOS:

    • Right click on the macOS project, then Set as startup

    - If โ€œMy Macโ€ is not selected in the top bar, make sure to select โ€œDebug | iPhone Simulatorโ€ in the selector

    For iOS:

    • Right click on the iOS project, then Set as startup

    - In the configuration selector, instead of Debug , select Debug | iPhoneSimulator

    For Android:

    • Right click on the Android project, then Set as startup
    • If your android device or simulator does not appear in the list, use the Debug configuration.

    ๐ŸŽ MacOS Implementation Details

    ๐ŸŽ The implementation of the macOS support is Uno is heavily based on the iOS support. The reason for this is UIKit for iOS being very close to AppKit on macOS. This allowed us to reuse large portions of the code from iOS and adjust to fit macOSโ€™s behavior.

    Yet, there are some very subtle differences in the implementation though, where methods such as UIKit.SizeThatFits() or UIKit.SetNeedsLayout() are either absent or behaving very differently. That may be why youโ€™ll notice parts that need so fit and finish and we encourage you to open issues on our GitHub repo.
    ๐Ÿ‘ You may ask why we did not choose to go the Catalyst route, and youโ€™d be right. The main reason is the lack of support for Catalyst from Xamarin, and if you want to chime in this issue if this is of interest to you.

    ๐Ÿš€ At this time, and contrary to whatโ€™s available for iOS, debugging and deploying a macOS app must be done through Visual Studio for mac, while only building is possible in Visual Studio 2019 for Windows. This feature is missing from the Xamarin tooling, and if you want that support to be added, you can vote on this issue on the Visual Studio Community site.

    ๐Ÿ”‹ Features

    • ๐ŸŽ macOS: Add support for Localization (a77611c)
    • ๐ŸŽ macOS: Enable macOS template from VSIX (bd6fbce)

    ๐Ÿ› Bug Fixes

    • dotnet_new: Adjust default active projects in VS for mac (ec2de29)
    • dotnet_new: Fix project guids duplicates causing issues in VS4mac (1ef6b78)
    • ๐ŸŽ macos: Missing mac platform for Uno.UI.RemoteControl (1d57cc2)
    • xbind: Possible invalid type cast in two-way mode (b952235)
    • xbind: Fix static member access in DataTemplate (d3c70c3)