Chuyển đến nội dung chính

レッスン 22: App Store と Google Play に公開する

Google Play Console: リスト、スクリーンショット、リリース トラック。 App Store Connect: メタデータ、TestFlight。アプリのレビューガイドライン。バージョン管理戦略、段階的なロールアウト。打ち上げ後のモニタリング。

💻 プログラミング — レッスン 22 レッスン 22: App Store と Google に公開する 遊ぶ

フラッター&ダーツ: 基本から上級まで

パート 6: テスト、CI/CD、本番環境

xdev.asia

1. 公開前の準備

# 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
チェックリストアンドロイドiOS
アプリアイコンあらゆるサイズのアダプティブアイコン1024x1024 + サイズ
スプラッシュスクリーンflutter_native_splashflutter_native_splash
権限AndroidManifest.xml情報plist
プロガードproguard-rules.pro該当なし
署名キーストア + key.properties証明書 + プロファイル

2.Google Playコンソール

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 コネクト

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 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. 打ち上げ後のモニタリング

// 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())),
  );
}

シリーズ完結おめでとうございます フラッター&ダーツ: 基本から上級まで! 🎉