Submit builds, manage metadata, and release to App Store Connect and Play Console.
Store Deployment Overview
┌─────────────────────────────────────────────────────────────────────┐
│ RELEASE PIPELINE │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ Build → Test → Sign → Upload → TestFlight/Internal → Review → │
│ Production │
│ │
└─────────────────────────────────────────────────────────────────────┘
App Store Connect (iOS)
Prerequisites
# 1. Apple Developer Program ($99/year)
# 2. App Store Connect account
# 3. Bundle ID registered in Developer Portal
# 4. Certificates & Provisioning Profiles
# 5. App record created in App Store ConnectBuild & Upload
# Build for App Store
flutter build ios --release --flavor prod
# Archive in Xcode
# Product → Archive → Distribute App → App Store Connect → Upload
# Or use command line
xcodebuild -workspace ios/Runner.xcworkspace \
-scheme Runner \
-configuration Release \
-archivePath build/Runner.xcarchive \
archive
xcodebuild -exportArchive \
-archivePath build/Runner.xcarchive \
-exportPath build/ipa \
-exportOptionsPlist ExportOptions.plist
# Upload with Transporter (macOS app) or altool
xcrun altool --upload-app \
-f build/ipa/Runner.ipa \
-t ios \
-u "your@appleid.com" \
-p "app-specific-password"Fastlane for App Store
# fastlane/Fastfile
platform :ios do
lane :release do
setup_ci if ENV['CI']
# Ensure certificates
sync_code_signing(type: 'appstore', readonly: true)
# Build
build_ios_app(
workspace: 'Runner.xcworkspace',
scheme: 'Runner',
configuration: 'Release',
export_method: 'app-store',
output_directory: 'build/ios/ipa',
output_name: 'Runner.ipa'
)
# Upload to TestFlight
upload_to_testflight(
api_key_path: 'fastlane/app_store_connect.json',
skip_waiting_for_build_processing: true,
changelog: 'Release notes here'
)
end
lane :appstore do
release
# Submit for review
deliver(
api_key_path: 'fastlane/app_store_connect.json',
submit_for_review: true,
automatic_release: true,
force: true,
skip_metadata: false,
skip_screenshots: false,
precheck_include_in_app_purchases: false
)
end
endApp Store Connect Setup
# fastlane/Appfile
app_identifier "com.example.myapp"
apple_id "your@appleid.com"
team_id "YOUR_TEAM_ID"
# App Store Connect API Key (preferred over Apple ID)
# Create at: App Store Connect → Users and Access → Keys
# Download .p8 file, note Key ID and Issuer ID// fastlane/app_store_connect.json
{
"key_id": "YOUR_KEY_ID",
"issuer_id": "YOUR_ISSUER_ID",
"key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----",
"in_house": false
}Metadata & Screenshots
# fastlane/metadata/en-US/name.txt
MyApp
# fastlane/metadata/en-US/description.txt
Amazing app description here.
# fastlane/metadata/en-US/keywords.txt
keyword1, keyword2, keyword3
# fastlane/metadata/en-US/support_url.txt
https://example.com/support
# fastlane/metadata/en-US/marketing_url.txt
https://example.com
# fastlane/metadata/en-US/privacy_url.txt
https://example.com/privacy
# fastlane/metadata/en-US/release_notes.txt
Version 1.0.0 - Initial release# Screenshots with fastlane snapshot
# fastlane/snapshots/en-US/01_launch.png
# fastlane/snapshots/en-US/02_home.png
# ...
# Generate with:
# fastlane snapshotPlay Console (Android)
Prerequisites
# 1. Google Play Developer Account ($25 one-time)
# 2. Play Console access
# 3. App signing set up (Play App Signing recommended)
# 4. Package name reservedBuild & Upload
# Build AAB (preferred over APK)
flutter build appbundle --release --flavor prod
# Output: build/app/outputs/bundle/prodRelease/app-prod-release.aabFastlane for Play Store
# fastlane/Fastfile
platform :android do
lane :internal do
gradle(task: 'clean')
gradle(
task: 'bundle',
build_type: 'Release',
flavor: 'prod',
properties: {
"android.injected.signing.store.file" => ENV['KEYSTORE_PATH'],
"android.injected.signing.store.password" => ENV['KEYSTORE_PASSWORD'],
"android.injected.signing.key.alias" => ENV['KEY_ALIAS'],
"android.injected.signing.key.password" => ENV['KEY_PASSWORD'],
}
)
upload_to_play_store(
track: 'internal',
aab: '../build/app/outputs/bundle/prodRelease/app-prod-release.aab',
json_key_data: ENV['GCLOUD_SERVICE_ACCOUNT'],
skip_upload_apk: true,
skip_upload_metadata: false,
skip_upload_images: false,
skip_upload_screenshots: false,
release_status: 'draft'
)
end
lane :production do
internal
# Promote to production (or use Play Console UI)
upload_to_play_store(
track: 'production',
track_promote_to: 'production',
version_code: ENV['VERSION_CODE'],
json_key_data: ENV['GCLOUD_SERVICE_ACCOUNT'],
release_status: 'completed',
rollout: '0.1' # 10% staged rollout
)
end
endService Account Setup
# 1. Google Cloud Console → IAM → Service Accounts
# 2. Create service account
# 3. Grant roles: "Play Console Admin" or custom
# 4. Create JSON key
# 5. In Play Console: Settings → API access → Link service account
# 6. Base64 encode for CI secret:
cat service-account.json | base64 -w 0Play Console Tracks
┌─────────────────────────────────────────────────────────────────────┐
│ PLAY CONSOLE TRACKS │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ Internal Testing → Closed Testing → Open Testing │
│ (100 testers max) → (invite only) → (public) │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ Quick feedback Wider testing Pre-launch │
│ Daily builds tracks validation │
│ │
│ Production Track │
│ (staged rollout 1% → 100%) │
│ │
└─────────────────────────────────────────────────────────────────────┘
Version Management
# pubspec.yaml
version: 1.0.0+1
# │ │ └── build number (versionCode for Android)
# │ └───── version name (versionName)
# └───────── major.minor.patch# Increment version
flutter pub run version_manager increment_build
flutter pub run version_manager increment_patch
flutter pub run version_manager increment_minor
flutter pub run version_manager increment_major
# Or manually
# version: 1.0.1+2# fastlane/Fastfile - auto increment
lane :increment_version do
# iOS
increment_build_number(xcodeproj: 'ios/Runner.xcodeproj')
increment_version_number(xcodeproj: 'ios/Runner.xcodeproj', version_number: '1.0.1')
# Android
gradle(task: 'clean')
gradle(task: 'bundle', build_type: 'Release',
properties: {
"versionCode" => ENV['VERSION_CODE'],
"versionName" => "1.0.1"
}
)
endPrivacy & Compliance
iOS Privacy Manifest (iOS 17+)
<!-- ios/Runner/PrivacyInfo.xcprivacy -->
<?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>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeIdentifier</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
</dict>
</plist>Android Data Safety
# Play Console → App Content → Data Safety
# Declare what data you collect and how it's used
# Required for all apps since July 2022Release Checklist
# Pre-release Checklist
## iOS
- [ ] Version bumped in pubspec.yaml
- [ ] Changelog updated
- [ ] Screenshots updated for all device sizes
- [ ] Privacy manifest added (iOS 17+)
- [ ] Export compliance answered
- [ ] Age rating completed
- [ ] TestFlight build processed
- [ ] Internal testing completed
- [ ] External testing (if needed)
- [ ] App Store Connect metadata complete
- [ ] Review guidelines reviewed
## Android
- [ ] Version bumped in pubspec.yaml
- [ ] Changelog updated
- [ ] AAB built and tested
- [ ] Data Safety form completed
- [ ] Target API level updated (min 34 for new apps)
- [ ] 64-bit architectures included
- [ ] Internal testing track passed
- [ ] Closed testing track passed
- [ ] Open testing track passed (optional)
- [ ] Play Console metadata complete
- [ ] Staged rollout percentage set
## Both
- [ ] Crash reporting verified (Sentry, Firebase Crashlytics)
- [ ] Analytics events firing
- [ ] Deep links tested
- [ ] Push notifications tested
- [ ] In-app purchases tested (if applicable)
- [ ] Backward compatibility verifiedMonitoring Post-Release
// lib/services/crash_reporting.dart
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> initCrashReporting() async {
// Firebase Crashlytics
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
// Sentry
await SentryFlutter.init(
(options) {
options.dsn = 'https://xxx@sentry.io/xxx';
options.tracesSampleRate = 1.0;
},
appRunner: () => runApp(MyApp()),
);
}Try It
Build iOS AAB/APK. Upload to TestFlight via Fastlane. Upload Android AAB to Play Console internal track. Configure metadata.
flutter build appbundle --release --flavor prod
flutter build ios --release --flavor prod
fastlane ios release
fastlane android internalDeploy to stores
- Set up App Store Connect app record
- Configure Fastlane match for iOS certificates
- Set up Play Console and Play App Signing
- Create service account for Play Console API
- Build and upload to TestFlight (internal)
- Build and upload to Play Console (internal)
- Complete store metadata and screenshots
- Submit for review / promote to production
iOS: App Store Connect + TestFlight + Fastlane. Android: Play Console + AAB + Fastlane. Both require privacy compliance (Data Safety, Privacy Manifest). Use staged rollouts. Monitor crashes post-release with Crashlytics/Sentry.
Resources
- App Store Connect: https://appstoreconnect.apple.com/
- Play Console: https://play.google.com/console
- Fastlane iOS: https://docs.fastlane.tools/getting-started/ios/setup/
- Fastlane Android: https://docs.fastlane.tools/getting-started/android/setup/
- Flutter Deployment: https://docs.flutter.dev/deployment/