Publishing Your .NET MAUI Application

Advanced 25 min read Lesson 8 of 8

Publishing Overview

Publishing your .NET MAUI app involves preparing it for distribution through various app stores or direct deployment. Each platform has specific requirements and processes.

Publishing Options
  • Android - Google Play Store, APK/AAB distribution
  • iOS - Apple App Store
  • Windows - Microsoft Store
  • macOS - Mac App Store

1. Publishing for Android

Step 1: Configure Android Manifest

// Platforms/Android/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.yourcompany.yourapp">
    <application android:allowBackup="true"
                 android:icon="@mipmap/appicon"
                 android:roundIcon="@mipmap/appicon_round"
                 android:label="Your App Name"
                 android:supportsRtl="true">
    </application>
    
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

Step 2: Create Keystore

// Generate keystore
keytool -genkey -v -keystore myapp.keystore -alias myapp -keyalg RSA -keysize 2048 -validity 10000

// Build signed APK/AAB
dotnet publish -f net10.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=myapp.keystore -p:AndroidSigningStorePass=password -p:AndroidSigningKeyAlias=myapp -p:AndroidSigningKeyPass=password

Step 3: Configure for Google Play

// In .csproj file
<PropertyGroup>
    <AndroidPackageFormat>aab</AndroidPackageFormat>
    <AndroidCreatePackagePerAbi>false</AndroidCreatePackagePerAbi>
</PropertyGroup>

// Create Google Play Console account
// Set up store listing
// Upload AAB file
// Complete store listing and pricing

2. Publishing for iOS

Step 1: Configure Info.plist

// Platforms/iOS/Info.plist
<key>CFBundleDisplayName</key>
<string>Your App Name</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.yourapp</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
    <string>armv7</string>
</array>

Step 2: Create Certificates

// Apple Developer Account required
1. Create App ID
2. Create Development Certificate
3. Create Distribution Certificate
4. Create Provisioning Profile
5. Configure in Visual Studio

Step 3: Build and Distribute

// Build for App Store
dotnet publish -f net10.0-ios -c Release -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64

// Using Visual Studio
1. Set configuration to Release
2. Set target to iPhone
3. Archive the app
4. Distribute to App Store

3. Publishing for Windows

Step 1: Configure Package.appxmanifest

// Platforms/Windows/Package.appxmanifest
<Identity Name="YourAppName"
          Publisher="CN=YourCompany"
          Version="1.0.0.0" />

<Properties>
    <DisplayName>Your App Name</DisplayName>
    <PublisherDisplayName>Your Company</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
</Properties>

Step 2: Create App Package

// Create app package
1. Right-click project
2. Select "Publish"
3. Choose "Create App Package"
4. Select "Microsoft Store"
5. Configure options
6. Generate package

Step 3: Submit to Microsoft Store

// Requirements
1. Microsoft Partner Center account
2. Create app listing
3. Upload package
4. Set pricing and availability
5. Submit for certification

App Store Optimization (ASO)

  • App Name: Use descriptive, keyword-rich name
  • Description: Clear, compelling with keywords
  • Screenshots: High-quality, showcasing features
  • App Icon: Professional and recognizable
  • Ratings: Encourage positive reviews

Pre-Publishing Checklist

Checklist
  • Test thoroughly on all target devices
  • Optimize app performance
  • Check for memory leaks
  • Verify all strings are localized
  • Update version numbers
  • Create app store listings
  • Prepare promotional materials
  • Set up analytics tracking
  • Implement crash reporting
  • Prepare support documentation
Key Takeaway
  • Each platform has specific publishing requirements
  • Prepare necessary certificates and accounts
  • Optimize your app store listing for visibility
  • Thorough testing before submission
Exercise

Publish your MAUI app:

  1. Create required store accounts
  2. Prepare all certificates and keys
  3. Build release versions for each platform
  4. Create store listings with screenshots
  5. Submit to app stores
  6. Monitor analytics and feedback
Test Your Knowledge - Take Quiz