Deploy .NET MAUI Apps on macOS
This tutorial walks you through the steps required to package and distribute a .NET Multi‑Platform App UI (MAUI) application for macOS.
Prerequisites
- macOS 12.0 or later
- Visual Studio 2022 for Mac (or Visual Studio 2022 on Windows with a connected Mac)
- .NET 8 SDK or later
- An Apple Developer account (for signing and notarization)
1. Configure the macOS Project
Open your MAUI solution and locate the Platforms/MacCatalyst
folder. Update the Info.plist
file with your app's display name and bundle identifier.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>MyMauiApp</string>
<key>CFBundleIdentifier</key>
<string>com.example.mymauiapp</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
2. Build the App Bundle
Run the following command in the terminal from the solution root:
dotnet publish -f net8.0-maccatalyst -c Release -o ./publish
The output folder will contain MyMauiApp.app
, which is the macOS bundle.
3. Sign the App
Use codesign
with your Developer ID certificate:
codesign --deep --force --verify --verbose \
--sign "Developer ID Application: Your Name (TEAMID)" \
./publish/MyMauiApp.app
4. Notarize the App
Upload the signed bundle to Apple for notarization:
ditto -c -k --keepParent ./publish/MyMauiApp.app MyMauiApp.zip
xcrun altool --notarize-app -f MyMauiApp.zip \
--primary-bundle-id com.example.mymauiapp \
-u your@appleid.com -p @keychain:AC_PASSWORD
# After approval:
xcrun stapler staple ./publish/MyMauiApp.app
5. Distribute
Once notarized, you can distribute the .app
bundle directly, or create a disk image (DMG) for a more polished installer.
hdiutil create -volname "MyMauiApp" -srcfolder ./publish/MyMauiApp.app \
-ov -format UDZO MyMauiApp.dmg