Telerik blogs

Welcome to the Sands of MAUI—newsletter-style issues dedicated to bringing together the latest .NET MAUI content relevant to developers.

A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.

.NET developers are excited with the reality of .NET Multi-platform App UI (.NET MAUI)—the evolution of modern .NET cross-platform developer technology stack. With stable tooling and a rich ecosystem, .NET MAUI empowers developers to build native cross-platform apps for mobile/desktop from single shared codebase, while inviting web technologies in the mix.

While it may take a long flight to reach the sands of MAUI island, developer excitement around .NET MAUI is quite palpable with all the created content. Like the grains of sand, every piece of news/article/documentation/video/tutorial/livestream contributes toward developer experiences in .NET MAUI and we grow a community/ecosystem willing to learn and help.

Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here’s what is noteworthy for the week of April 15, 2024:

.NET 9 Release

.NET is constantly evolving and the next big milestone is already cooking. Following the successful launch of .NET 8 a few months back, .NET is back on its annual release cycle—say hello to .NET 9 with Preview 3 now out. Comprehensive release notes highlight most of the enhancements in .NET 9 Preview 3 across .NET Libraries, Runtime and SDKs.

Set to be released at .NET Conf in November 2024, work is underway toward the next big .NET release. The most important focus areas for .NET 9 are cloud-native and intelligent app development. Developers can expect significant investments in performance, productivity and security, as well as advancements across the .NET platform. Tooling will get better with Visual Studio and Visual Studio Code with the C# Dev Kit, and cloud deployments will get easier using Azure services. Microsoft will continue to work with developers looking for ways to use C# skills to build next generation of intelligent apps, and to rapidly invest in AI.

Along with .NET 9 Preview 3 release, come fresh new bits for .NET MAUI. The team is continuing work on core fundamentals of the .NET MAUI SDK to improve overall product quality—this includes expanding test coverage, end to end scenario testing and bug fixing. The .NET MAUI bits for .NET 9 Preview 3 include support for Asset Packs for Android and multi-target versions for iOS bindings, amongst other things. Developers can get started with Preview 3 today—.NET 9 promises great things for the ecosystem.

.NET MAUI mascot

Blazor Hybrid Story

.NET MAUI is squarely meant for developers to build native mobile/desktop apps—however, armed with modern smart WebViews, .NET MAUI is more than capable to welcome web content to native land. In fact, Blazor/JavaScript developers should feel empowered to bring web UI components, routing, styling and more to native cross-platform .NET MAUI apps, while gaining complete native platform API access. Beth Massi joined Jon Galloway and Mackinnon Buck for the latest ASP.NET Community Standup to drive home the promise—Blazor Hybrid story with .NET 9.

Beth started out with a refresher on .NET MAUI and Blazor Hybrid apps—the ease of welcoming Blazor developers to native mobile/desktop world should be well-established by now. Beth had some cool demos to showcase the reusability of Blazor UI/styles across native and web apps, along with teasing a proposed Blazor Hybrid with Web solution template.

But why stop at Blazor when JavaScript web developers can also be welcomed to .NET MAUI land? With the experimental HybridWebView for .NET MAUI, developers have a more flexible WebView to host web content inside .NET MAUI apps—this could be for SPA apps written with Angular/React/Vue and more. The real benefit with HybridWebView is easy communication between the code running inside the WebView with the WebView host—yes, .NET and JS can freely talk to each other. Developers now have a lot of flexibility to mix and match native UI with web UI for seamless code sharing—the Hybrid story and developer experience is poised to get better with .NET 9.

.NET Community Standup: Blazor Hybrid + Web in .NET 9 - Beth Massi, Jon Galloway, Mackinnon Buck

Android Manifest in .NET MAUI

.NET MAUI is built to enable .NET developers to create cross-platform apps for Android, iOS, macOS and Windows, with deep native integrations, platform-native UI and hybrid experiences that extend the reach of Blazor/JS web UI technologies. Although .NET MAUI offers a shared code base, specific configurations are necessary for each platform and things get interesting in Android land with AndroidManifest.xml file configurations. Who better to provide guidance than Leomaris Reyes, who wrote up a wonderful article—exploring the Android Manifest in .NET MAUI.

The AndroidManifest.xml file is crucial for Android apps in defining key configuration characteristics—including application information, permissions, compatibility and restrictions. Leomaris takes time to explain how .NET MAUI handles AndroidManifest.xml file—default project templates create one in the platform-specific folder, but additional manifest is created by merging XML generated from specific features in app classes. Manifest declarations begin with Activity settings for Android, with configurations for App Title Bar, Main Launcher, User Permissions and Intents that describe app capabilities.

There is quite a bit to take in, but developers targeting Android know the importance of understanding the nuances of Android Manifest—.NET MAUI and tooling is here to help.

Android Manifest

Apple Privacy Manifest

Privacy matters. Modern app developers need to keep user data privacy a top priority—it is not only the right thing to do, but is also needed for compliance to regulations. Apple is introducing some stricter guidelines for managing privacy for iOS apps. This is true for any apps in the App Store and, naturally, affects cross-platform apps written with .NET MAUI. Thankfully for .NET developers, Gerald Versluis is ahead of the curve and produced a video as a definitive guide— adding Apple Privacy Manifest support for iOS apps written with .NET.

Apple is introducing a new privacy policy for including privacy manifest files in all apps targeted for iOS, iPadOS and tvOS platforms on the App Store—this would be mandatory as of May 1, 2024. The Apple Privacy Manifest would be in the form of a PrivacyInfo.xcprivacy file that would list all types of data used/collected by apps and document usage of Required Reason APIs. This would be surfaced to users with App Store listings.

All .NET MAUI, Xamarin/Xamarin.Forms and .NET for iOS apps use some SDK pieces that would require privacy/reason declarations. Gerald walks through a sample privacy manifest that would be the minimum for all .NET-based iOS apps. Ultimately, it is the developer’s responsibility to inform users about how apps process their data and provide that information the correct way to Apple—Gerald showcased adding the privacy manifest to a templated .NET MAUI project. Folks building iOS apps with .NET can get started with the new privacy manifest requirement now. It is the requirement and there is well-documented help from .NET platforms toward building compliant iOS/iPadOS/tvOS apps.

Apple Privacy Manifest with Gerald Versluis

Shiny.NET for .NET MAUI

Developer excitement is palpable with .NET MAUI—the evolution of cross-platform .NET development stack reaching mobile/desktop from a shared codebase. With increased stability and a rich ecosystem, there are lot more developers building cross-platform apps with .NET MAUI—many seeking consistent developer experiences and advanced platform integrations. Allan Ritchie has been busy maintaining developer tooling for a while and joined an aging developer to share experiences on a recent .NET Dev Show—Shiny.NET for .NET MAUI.

Shiny is a popular cross-platform framework designed to make working with device services and background processes easy, testable and consistent for developers. For .NET MAUI developers, Shiny brings along lot of goodies—device permissions, logging, background jobs, BLE support, beacons, push notifications and more.

Allan talked through all things shiny for an upcoming release—a lot of streamlined developer workflow enhancements are ready out of the box. With App Builder, developers can choose exactly the functionality/libraries they want Shiny to light up in their .NET apps. Allan walked through the developer experience using GPS, GeoFencing, Background Jobs and Push Notifications. While background work and deep native platform integrations are often tricky, developers can use Shiny to do most of the heavy lifting—productivity for the win!

Shiny.NET on Code It Live

That’s it for now.

We’ll see you next week with more awesome content relevant to .NET MAUI.

Cheers developers!


SamBasu
About the Author

Sam Basu

Sam Basu is a technologist, author, speaker, Microsoft MVP, gadget-lover and Progress Developer Advocate for Telerik products. With a long developer background, he now spends much of his time advocating modern web/mobile/cloud development platforms on Microsoft/Telerik technology stacks. His spare times call for travel, fast cars, cricket and culinary adventures with the family. You can find him on the internet.

Related Posts

Comments

Comments are disabled in preview mode.