Skip to content
Tutorials Center
My learning

Topics

Lesson 38 of 42 ยท Testing and Publishing

Publishing to the Stores

Prepare and publish a .NET MAUI app: app ID and versioning, signing keys, release builds for Android, iOS and Windows, store listings, CI builds and a release checklist with a version bump tool.

Writing the app is half the work. To reach users you must produce a signed, versioned release build for each platform and submit it to a store: Google Play for Android, the App Store for iOS and macOS (Mac Catalyst), and the Microsoft Store (or direct installers) for Windows. This lesson walks through the shared steps and the platform differences, and finishes with a pre-release checklist.

Publishing needs developer accounts, signing keys, Xcode on a Mac and store consoles, none of which can run on this site. Commands and project settings are shown read-only. The runnable stand-ins implement the version-number rules and a release checklist in C#.

What you need

Platform Account Cost (typical) Build machine
Android (Google Play) Google Play Console one-time fee Windows, macOS or Linux
iOS (App Store) Apple Developer Program yearly fee A Mac (local or cloud) with Xcode
Windows (Microsoft Store) Partner Center one-time fee Windows
Direct distribution none free per platform

Fees and rules change, so check each store's current page before you start.

Identity and version numbers

Three values identify and order your app. They live in the .csproj:

XML
<PropertyGroup>
    <ApplicationTitle>Pocket Notes</ApplicationTitle>
    <ApplicationId>com.example.pocketnotes</ApplicationId>
    <ApplicationDisplayVersion>1.4.0</ApplicationDisplayVersion>
    <ApplicationVersion>14</ApplicationVersion>
</PropertyGroup>
  • ApplicationId is the permanent reverse-domain identifier (the Android package name and the iOS bundle identifier). Choose it once. It cannot change after publishing without making a new app.
  • ApplicationDisplayVersion is what users see (1.4.0), usually semantic versioning: major.minor.patch.
  • ApplicationVersion is an integer build number the stores use to order uploads (Android versionCode, iOS CFBundleVersion). It must increase with every upload and never be reused.

A helpful rule is to derive the build number from the display version or from the CI run number, so you never forget to bump it:

C# Stand-in: derive a build number from a version

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with Console.ReadLine()), it gets the next line from this box.

(Google Play allows a build number up to 2,100,000,000, so this formula has plenty of room.)

Android

  1. Create a keystore once, back it up in a safe place, and protect its passwords. Losing it can lock you out of updates unless you use Play App Signing.

    TEXT
    keytool -genkey -v -keystore pocketnotes.keystore -alias pocketnotes -keyalg RSA -keysize 2048 -validity 10000
    
  2. Configure signing in the project (use environment variables or a secrets store; never commit passwords):

    XML
    <PropertyGroup Condition="$(TargetFramework.Contains('-android')) and '$(Configuration)' == 'Release'">
        <AndroidKeyStore>true</AndroidKeyStore>
        <AndroidSigningKeyStore>pocketnotes.keystore</AndroidSigningKeyStore>
        <AndroidSigningKeyAlias>pocketnotes</AndroidSigningKeyAlias>
        <AndroidSigningKeyPass>env:ANDROID_KEY_PASS</AndroidSigningKeyPass>
        <AndroidSigningStorePass>env:ANDROID_STORE_PASS</AndroidSigningStorePass>
        <AndroidPackageFormat>aab</AndroidPackageFormat>
    </PropertyGroup>
    
  3. Build an Android App Bundle (.aab), the format Google Play requires for new apps:

    TEXT
    dotnet publish -f net10.0-android -c Release
    
  4. In the Play Console: create the app, fill in the store listing (title, descriptions, screenshots, icon, feature graphic), the content rating questionnaire, the privacy policy URL and the Data safety form, then upload the bundle to a testing track first (internal, closed, then open) before production.

Use Play App Signing: Google holds the final signing key and you sign uploads with an upload key, which can be reset if you lose it.

iOS and Mac Catalyst

Apple signing uses certificates and provisioning profiles.

  1. Join the Apple Developer Program and create an App ID that matches ApplicationId.

  2. Create a Distribution certificate and an App Store provisioning profile (Xcode or the developer portal can manage both automatically; a Mac is needed at least for the signing step).

  3. Set the signing properties:

    XML
    <PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
        <CodesignKey>Apple Distribution: Example Ltd (TEAMID1234)</CodesignKey>
        <CodesignProvision>PocketNotes AppStore</CodesignProvision>
    </PropertyGroup>
    
  4. Build the archive:

    TEXT
    dotnet publish -f net10.0-ios -c Release
    
  5. Upload the .ipa with Xcode's Transporter app or xcrun altool/notarytool workflows, then use App Store Connect and TestFlight to test, fill in the listing and submit for review.

Apple review is strict: your app needs a privacy policy, accurate permission usage strings (see Permissions), no crashes, a working demo account if you require login, and in-app purchases through Apple's system for digital goods. Review takes from hours to a few days; rejections come with an explanation you can fix and resubmit.

Windows

You can publish a Windows app as an MSIX package for the Microsoft Store, or ship an installer or a self-contained folder directly.

XML
<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
    <WindowsPackageType>MSIX</WindowsPackageType>
    <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
</PropertyGroup>
TEXT
dotnet publish -f net10.0-windows10.0.19041.0 -c Release

For the Store, associate the project with your Store app name in Visual Studio (Publish > Associate App with the Store), build the .msixupload package and upload it in Partner Center. For direct distribution, sign the package with a code signing certificate; unsigned apps show warning screens.

Release build checklist

Before every upload, check the things that most often fail reviews or hurt users. This stand-in encodes a checklist as data and reports what is missing:

C# Stand-in: release readiness checker

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with Console.ReadLine()), it gets the next line from this box.

Automating builds

Building by hand is error prone. A CI system (GitHub Actions, Azure Pipelines) can build every platform on each tag, with secrets held by the CI system. A sketch:

YAML
name: android-release
on:
  push:
    tags: ["v*"]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-dotnet@v4
        with: { dotnet-version: "10.0.x" }
      - run: dotnet workload install maui-android
      - run: >
          dotnet publish src/PocketNotes -f net10.0-android -c Release
          -p:ApplicationVersion=${{ github.run_number }}
        env:
          ANDROID_KEY_PASS: ${{ secrets.ANDROID_KEY_PASS }}
          ANDROID_STORE_PASS: ${{ secrets.ANDROID_STORE_PASS }}
      - uses: actions/upload-artifact@v4
        with: { name: aab, path: "**/*.aab" }

The iOS job must run on a macOS runner. Using the CI run number as ApplicationVersion guarantees the build number always increases.

After release

  • Roll out gradually (Play Console staged rollout) and watch crash reports.
  • Keep the old signing and provisioning files safe.
  • Plan for updates: schema migrations for local databases, backward-compatible APIs, and a way to tell users to update.
  • Track store reviews, and keep a changelog ("What's new") written for users.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which value must increase with every store upload?

    Stores order uploads by the integer build number (versionCode or CFBundleVersion). It must be higher each time.
  2. 2. Which Android package format does Google Play require for new apps?

    New apps are published as .aab bundles; Google generates optimized APKs for each device.
  3. 3. Where should signing passwords live in a CI build?

    Secrets in source control leak. CI secret stores keep them out of the repository.
  4. 4. Why is the ApplicationId important to choose carefully?

    The ID is the package name or bundle identifier. Changing it creates a different app.

Summary

  • Choose ApplicationId once; show ApplicationDisplayVersion to users and increase the integer ApplicationVersion for every upload.
  • Android: keystore, .aab, Play Console with testing tracks and Play App Signing.
  • iOS: Apple Developer account, certificates and provisioning profiles, a Mac, App Store Connect and TestFlight.
  • Windows: MSIX for the Microsoft Store or a signed direct package.
  • Automate builds in CI with secrets stored outside the repository, and test the Release build on real devices.

Next: Project: Notes App