Question #29MediumTools & DevOps

How to deploy apps in play store and App Store

Answer

Overview

Deploying a Flutter app to the Google Play Store (Android) and Apple App Store (iOS) involves building a signed release binary and submitting it through the respective platforms' developer consoles.


Android — Google Play Store

Step 1: Generate a Keystore (one-time)

bash
keytool -genkey -v -keystore ~/my-release-key.jks \
  -keyalg RSA -keysize 2048 -validity 10000 \
  -alias my-key-alias

Step 2: Configure Signing in android/app/build.gradle

gradle
android {
    signingConfigs {
        release {
            storeFile file('/path/to/my-release-key.jks')
            storePassword 'your_store_password'
            keyAlias 'my-key-alias'
            keyPassword 'your_key_password'
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

✅ Store passwords in

text
key.properties
file (not in code) and add it to
text
.gitignore
.

Step 3: Build Release APK or App Bundle

bash
# App Bundle (recommended — smaller download for users)
flutter build appbundle --release

# APK (for direct distribution)
flutter build apk --release --split-per-abi

Step 4: Upload to Play Console

  1. Go to play.google.com/console
  2. Create app → Fill in store listing details
  3. Go to Release → Production → Create new release
  4. Upload the
    text
    .aab
    file from
    text
    build/app/outputs/bundle/release/
  5. Add release notes → Review → Rollout

iOS — Apple App Store

Prerequisites

  • Apple Developer Account ($99/year)
  • Xcode installed on macOS
  • App registered in App Store Connect

Step 1: Configure Bundle ID & Signing in Xcode

bash
open ios/Runner.xcworkspace

In Xcode:

  • Set Bundle Identifier (e.g.,
    text
    com.yourcompany.myapp
    )
  • Select Team (your Apple Developer team)
  • Enable Automatically manage signing

Step 2: Build Release IPA

bash
# Build iOS release
flutter build ios --release

# Or archive via Xcode:
# Product → Archive → Distribute App → App Store Connect

Step 3: Upload via Xcode or Transporter

bash
# Via Xcode Organizer
# Window → Organizer → Archives → Distribute App

Step 4: Submit in App Store Connect

  1. Go to appstoreconnect.apple.com
  2. My Apps → + → New App
  3. Fill app info (name, category, age rating)
  4. Add screenshots, description, keywords
  5. Select build uploaded from Xcode
  6. Submit for Review

Summary Comparison

StepAndroid (Play Store)iOS (App Store)
AccountGoogle Play ($25 one-time)Apple Dev ($99/year)
Build format
text
.aab
(preferred) or
text
.apk
text
.ipa
via Xcode Archive
SigningKeystore
text
.jks
file
Xcode automatic signing
Review timeHours to 1–2 days1–3 days
Upload toolPlay Console websiteXcode / Transporter