Help center › Mobile app development

Build .NET MAUI apps for iOS

Build and run with the .NET CLI on your Mac. Visual Studio’s Pair to Mac isn’t supported yet.

About Pair to Mac

Visual Studio’s Pair to Mac logs in to the Mac with a username and password the first time, and Microsoft designs it for a Mac on the same local network. RunMac Macs accept SSH keys only, on their own port, so Pair to Mac can’t connect to them today. Build on the Mac with the .NET CLI instead: it’s the same compiler.

Set up

  1. Install the Xcode version your .NET MAUI release needs (see Microsoft’s release versions table), and open it once.
  2. Install the .NET SDK for macOS (Arm64) from dotnet.microsoft.com, then check with dotnet --version.
  3. Install the MAUI workload:
    sudo dotnet workload install maui --source https://api.nuget.org/v3/index.json

Build and run

From your project folder, using your project’s iOS target framework (Microsoft’s example is net8.0-ios):

dotnet build -t:Run -f net8.0-ios

This builds the app and launches it in the default simulator; watch it with Screen Sharing. To choose a simulator, get its UDID from xcrun simctl list and add -p:_DeviceName=:v2:udid=THE-UDID.

Related

Install Xcode and simulatorsSign in with your own Apple Account, install Xcode, accept the licence, add simulators.Set up your Mac for iOS developmentThe order to do things in: connect, Xcode, your Apple Account, GitHub, then your first build.Build and test from the command linexcodebuild and the simulator over SSH: list schemes, pick a simulator, build and run tests.

Still stuck?

Signed-in customers can message us from the portal; we reply within 24 hours on business days (AEST).