app-store-deployment

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

App Store Deployment

应用商店部署

Publish mobile applications to iOS App Store and Google Play with proper procedures.
按照规范流程将移动应用发布到iOS App Store和Google Play。

iOS Deployment

iOS部署

Build and Archive

构建与归档

bash
undefined
bash
undefined

Build archive

Build archive

xcodebuild -workspace App.xcworkspace
-scheme App
-sdk iphoneos
-configuration Release
-archivePath build/App.xcarchive
archive
xcodebuild -workspace App.xcworkspace
-scheme App
-sdk iphoneos
-configuration Release
-archivePath build/App.xcarchive
archive

Export IPA

Export IPA

xcodebuild -exportArchive
-archivePath build/App.xcarchive
-exportOptionsPlist ExportOptions.plist
-exportPath build/
undefined
xcodebuild -exportArchive
-archivePath build/App.xcarchive
-exportOptionsPlist ExportOptions.plist
-exportPath build/
undefined

Upload to App Store Connect

上传到App Store Connect

bash
xcrun altool --upload-app \
  --type ios \
  --file build/App.ipa \
  --username "$APPLE_ID" \
  --password "$APP_SPECIFIC_PASSWORD"
bash
xcrun altool --upload-app \
  --type ios \
  --file build/App.ipa \
  --username "$APPLE_ID" \
  --password "$APP_SPECIFIC_PASSWORD"

Android Deployment

Android部署

Build Release APK/Bundle

构建发布版APK/应用包

bash
undefined
bash
undefined

Generate keystore (once)

Generate keystore (once)

keytool -genkey -v -keystore release.keystore
-alias app -keyalg RSA -keysize 2048 -validity 10000
keytool -genkey -v -keystore release.keystore
-alias app -keyalg RSA -keysize 2048 -validity 10000

Build release bundle

Build release bundle

./gradlew bundleRelease
undefined
./gradlew bundleRelease
undefined

gradle.properties

gradle.properties

properties
RELEASE_STORE_FILE=release.keystore
RELEASE_KEY_ALIAS=app
RELEASE_STORE_PASSWORD=****
RELEASE_KEY_PASSWORD=****
properties
RELEASE_STORE_FILE=release.keystore
RELEASE_KEY_ALIAS=app
RELEASE_STORE_PASSWORD=****
RELEASE_KEY_PASSWORD=****

Version Management

版本管理

json
{
  "version": "1.2.3",
  "ios": { "buildNumber": "45" },
  "android": { "versionCode": 45 }
}
json
{
  "version": "1.2.3",
  "ios": { "buildNumber": "45" },
  "android": { "versionCode": 45 }
}

Pre-Deployment Checklist

部署前检查清单

  • All tests passing (>80% coverage)
  • App icons for all sizes
  • Screenshots for store listing
  • Privacy policy URL configured
  • Permissions justified
  • Tested on minimum supported OS
  • Release notes prepared
  • 所有测试通过(覆盖率>80%)
  • 全尺寸应用图标已准备
  • 应用商店详情页截图已准备
  • 隐私政策URL已配置
  • 权限申请已说明理由
  • 在最低支持的OS版本上完成测试
  • 发布说明已准备

CI/CD (GitHub Actions)

CI/CD(GitHub Actions)

yaml
on:
  push:
    tags: ['v*']

jobs:
  deploy-ios:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up environment
        run: |
          # Accept Xcode license if needed
          sudo xcodebuild -license accept || true

      - name: Build archive
        run: |
          xcodebuild -workspace App.xcworkspace \
            -scheme App \
            -sdk iphoneos \
            -configuration Release \
            -archivePath build/App.xcarchive \
            archive

      - name: Export IPA
        run: |
          xcodebuild -exportArchive \
            -archivePath build/App.xcarchive \
            -exportOptionsPlist ExportOptions.plist \
            -exportPath build/

      - name: Upload to App Store Connect
        env:
          APPLE_ID: ${{ secrets.APPLE_ID }}
          APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
        run: |
          xcrun altool --upload-app \
            --type ios \
            --file build/App.ipa \
            --username "$APPLE_ID" \
            --password "$APP_SPECIFIC_PASSWORD"

  deploy-android:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./gradlew bundleRelease
      - uses: r0adkll/upload-google-play@v1
yaml
on:
  push:
    tags: ['v*']

jobs:
  deploy-ios:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up environment
        run: |
          # Accept Xcode license if needed
          sudo xcodebuild -license accept || true

      - name: Build archive
        run: |
          xcodebuild -workspace App.xcworkspace \
            -scheme App \
            -sdk iphoneos \
            -configuration Release \
            -archivePath build/App.xcarchive \
            archive

      - name: Export IPA
        run: |
          xcodebuild -exportArchive \
            -archivePath build/App.xcarchive \
            -exportOptionsPlist ExportOptions.plist \
            -exportPath build/

      - name: Upload to App Store Connect
        env:
          APPLE_ID: ${{ secrets.APPLE_ID }}
          APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
        run: |
          xcrun altool --upload-app \
            --type ios \
            --file build/App.ipa \
            --username "$APPLE_ID" \
            --password "$APP_SPECIFIC_PASSWORD"

  deploy-android:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./gradlew bundleRelease
      - uses: r0adkll/upload-google-play@v1

Best Practices

最佳实践

  • Automate deployment with CI/CD
  • Test on physical devices
  • Secure signing materials separately
  • Monitor crash reports post-launch
  • 使用CI/CD实现部署自动化
  • 在物理设备上完成测试
  • 单独安全存储签名材料
  • 上线后监控崩溃报告