MAUI/Xamarin iOS Publishing to App Store with one Command

Cutting 50 minute iOS Apple TestFlight deployments to 50 seconds for Xamarin & MAUI

3 min readMay 2, 2023


It turns out that publishing/ deploying to the Apple App Store doesn’t have to be difficult and don’t need to touch Visual Studio or even Xcode in order to deploy (though you do still need a Mac). You just need to have Visual Studio & Xcode installed in order to allow for running these commands in your terminal. I know it’s a common problem because I have several YouTube videos on publishing iOS apps that have raked over 1000 hours viewed over the years.

Here’s the steps you need:

  1. Open the terminal in your solution directory

2. Replace Sample with your specific namespace, APPLE_DEVELOPER_EMAIL with your Apple developer account email, APPLE_APP_SPECIFIC_PASSWORD with your App Specific Password

3. Run this for Xamarin.Forms/Xamarin.Native in the terminal & voilà!

msbuild Sample/Sample.iOS/Sample.iOS.csproj /verbosity:normal /t:Build /p:Platform=iPhone /p:Configuration=Release && xcrun altool --upload-app -u {APPLE_DEVELOPER_EMAIL} -p {APPLE_APP_SPECIFIC_PASSWORD} -t ios -f Sample/Sample.iOS/bin/iPhone/Release/Sample.ipa

Or run this for MAUI

dotnet publish -f net7.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 && xcrun altool - upload-app -u {APPLE_DEVELOPER_EMAIL} -p {APPLE_APP_SPECIFIC_PASSWORD} -t ios -f Sample/bin/Release/net7.0-ios/ios-arm64/publish/Sample.ipa

Possible Issues

Here’s some things that will prevent it from succeeding:

  • If you haven’t correctly setup your provisioning profile and certificates for the bundle Id, I always recommend Automatic, which means your existing iOS.csproj file would have Distribution in the CodesignKey and a CodesignProvision of Automatic. You can look at the DetectSigningIdentity section of the logs to make sure it is correct.
  • For Xamarin: If you don’t have this in your iOS.csproj file…