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
- Install the Xcode version your .NET MAUI release needs (see Microsoft’s release versions table), and open it once.
- Install the .NET SDK for macOS (Arm64) from dotnet.microsoft.com, then check with
dotnet --version. - 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.