.NET MAUI 6.0 - Emulators And Simulators

This article describes the virtual devices available for developing and debugging .NET MAUI apps with VS 2022. I developed KH Authenticator, a .NET MAUI App for Windows and Android which registers and authenticates a user without a password or email address. See KH Authenticator Server.

.NET MAUI 6.0 Introduction Series

This article series is about the implementation of .NET MAUI 6.0 with Visual Studio 2022. Almost 10 years ago, I developed and published an Android Studio project with Java programming. I bought a Mac Mini and researched Xcode and Swift programming. VS 2022 and .NET MAUI projects compile C# programming for iOS, Android, macOS, and Windows operating systems. See .NET Multi-platform App UI (.NET MAUI) | .NET (microsoft.com).

Updated with links as the articles become published.

My current knowledge of iOS simulators is from research only. A Mac and Xcode are required. I'm not sure if Mac Catalyst is still required, research found "There's no need to run a separate application on the Mac – Visual Studio 2022 invokes Mac builds securely over SSH." I will update this article after I have personally worked with the technology.

Android emulators and iOS simulators are essential to developing and debugging a .NET MAUI app targeting a mobile operating system. Layout design and compatibility testing is a lot easier with a emulator rather than packaging and deploying the app to a physical device. To deploy the app to an emulator, VS 2022 builds, creates, and attaches a temporary package compatible with the target operating system. This is a resource intensive process. After initial layout design, most development and debugging is preformed targeting Windows which builds and deploys much more quickly. Provisioning emulators early in the development cycle is worth the effort.

Both Android emulators and iOS simulators require the .NET Muti-platform App UI development workload. You can install or verify the workload from the VS 2022 menu. Tools > Get Tools and Features.

Get Tools and Features..
Tools and Features.
Select Target OS

Android Emulator

If you have used Android Studio then you will recognize the Android Device Manager and Android emulators installed with the .NET Muti-platform App UI development workload. You can launch the Android Device Manager from Tools > Android > Android Device Manager.

Android Device Manager..

You select and configure emulators from the New menu item on the Android Device Manager.

Android Device Manager New Device..

Notice not all support the Google Play Store. I am close to publishing KH Authenticator in the Play Store so I choose emulators with support. When you start the emulator the first time, it prompts you to create or log in with a Google account (Gmail address). It automatically configures and uses the host's internet connection. I configured a Nexus 5X - API 28 for my initial development. I added a Pixel 4 - API 33 later to verify compatibilty with the highest available API.

You can select the emulator from the launch option dropdown to build, package, and deploy the app to the emulator with debugging capabilities. This process is very resource intensive and spikes my processor utilization to 100 percent. Developing and debugging with the Windows Machine configuration is much easier and quicker. I use the emulators more to verify function, compatibility, and UI for features I have working on the Windows Machine configuration.

Android emulator selector..

The emulator has surprisingly realistic functionality. There are extended controls which mock more advanced features.

Android extended controls..

iOS Simulator

VS 2022 and .NET MAUI projects compile to Mac Catalyst. Building native iOS applications using .NET Multi-platform App UI (.NET MAUI) requires access to Apple's build tools, which only run on a Mac. Because of this, Visual Studio 2022 must connect to a network-accessible Mac to build .NET MAUI iOS apps.

I need to acquire a Mac Mini (M1) before I will write about iOS development. I will update this article after I have personally worked with the technology. I hope to add a little insight and more detail to these MS Docs.

Ken Haggerty
Created 03/23/23
Updated 03/23/23 03:32 GMT

Log In or Reset Quota to read more.

Article Tags:

Android NET MAUI VS 2022
Successfully completed. Thank you for contributing.
Contribute to enjoy content without advertisments.
Something went wrong. Please try again.

Comments(0)

Loading...
Loading...

Not accepting new comments.

Submit your comment. Comments are moderated.

User Image.
DisplayedName - Member Since ?