1. Prepare before Publish
# pubspec.yaml
name: my_app
description: A Flutter application
version: 1.0.0+1 # version_name + version_code
flutter:
uses-material-design: true
assets:
- assets/images/
- assets/icons/
# Build release
flutter build appbundle --release # Android AAB
flutter build ipa --release # iOS IPA
# Verify APK size
flutter build apk --analyze-size
| Checklist | Android | iOS |
|---|---|---|
| App icon | Adaptive icons of all sizes | 1024x1024 + sizes |
| Splash screen | flutter_native_splash | flutter_native_splash |
| Permissions | AndroidManifest.xml | Info.plist |
| ProGuard | proguard-rules.pro | N/A |
| Signing | Keystore + key.properties | Certificates + Profiles |
2. Google Play Console
Google Play Console workflow:
1. Tạo app: All apps → Create app
2. Store listing:
- Title, Short description, Full description
- Screenshots: phone (2+), tablet, TV nếu có
- Feature graphic: 1024x500
- App icon: 512x512
3. App content:
- Privacy policy URL
- Content rating questionnaire
- Target audience
- Data safety form
4. Release:
- Internal testing → Closed testing → Open testing → Production
- Upload AAB file
- Release notes cho mỗi version
5. Pricing & Distribution: Free/Paid, countries
3. App Store Connect
App Store Connect workflow:
1. Tạo app: My Apps → (+) New App
- Bundle ID matching Xcode
- SKU unique
2. App Information:
- Name, subtitle, category
- Privacy policy URL
- Age rating
3. Prepare for Submission:
- Screenshots: 6.7", 6.5", 5.5" iPhone + iPad
- Description, keywords, support URL
- Build: upload từ Xcode hoặc Transporter
4. TestFlight:
- Internal testing (25 testers max)
- External testing (10,000 testers)
5. Submit for Review
4. Versioning & Staged Rollout
// Versioning strategy
// pubspec.yaml version format: MAJOR.MINOR.PATCH+BUILD_NUMBER
// Ví dụ: 1.2.3+45
// Auto-increment build number trong CI
// flutter build apk --build-number=$GITHUB_RUN_NUMBER
# Android staged rollout
# Google Play Console → Release → Production
# Rollout percentage: 5% → 20% → 50% → 100%
# iOS phased release
# App Store Connect → Version → Phased Release
# 1% → 2% → 5% → 10% → 20% → 50% → 100% (7 ngày)
5. Post-Launch Monitoring
// Firebase Crashlytics — theo dõi crashes
// Firebase Analytics — user behavior
// Firebase Performance — app performance
// Sentry alternative
import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> main() async {
await SentryFlutter.init(
(options) {
options.dsn = 'https://[email protected]/project';
options.tracesSampleRate = 0.2;
options.environment = 'production';
},
appRunner: () => runApp(const ProviderScope(child: MyApp())),
);
}
Congratulations on completing the series Flutter & Dart: From Basics to Advanced! 🎉