Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 19, 2025

Overview

This PR implements automated iOS App Store deployment via Fastlane in CI/CD, mirroring the existing Android Play Store deployment workflow to provide consistent cross-platform deployment.

Problem

The repository had automated Android deployment through Fastlane but lacked equivalent iOS deployment capabilities. This created an inconsistent deployment experience across platforms and required manual iOS app releases.

Solution

Implemented a complete iOS deployment workflow that matches the Android deployment pattern:

Deployment Triggers

  • RC Tags (v*.*.*-rc*): Automatically deploy to TestFlight internal testing with dev flavor

    • Example: v2.11.3-rc1 → TestFlight Internal
  • Release Tags (v*.*.*): Automatically deploy to TestFlight external testing with prod flavor

    • Example: v2.11.3 → TestFlight Beta
  • Published Releases: Automatically promote to App Store production

    • Triggered when a GitHub release is published
  • Manual Dispatch: Support for manual workflow execution with lane selection

Implementation Details

GitHub Actions Workflow (.github/workflows/deploy-to-appstore.yaml)

  • Uses macos-latest runner (required for iOS builds)
  • Implements secure code signing with certificates and provisioning profiles
  • Creates temporary keychain for build process
  • Dynamically generates ExportOptions.plist
  • Supports same variable extraction as Android (lane, build number, flavor)

Fastlane Configuration (ios/fastlane/Fastfile)

  • internal lane: Builds with dev flavor and uploads to TestFlight internal testing
  • beta lane: Builds with prod flavor and uploads to TestFlight external testing
  • promote_to_production lane: Promotes existing TestFlight build to App Store
  • Uses flutter build ipa with proper export options and code signing

Additional Files

  • ios/fastlane/Appfile: App identifier and team configuration
  • ios/Gemfile: Fastlane gem dependency (>= 2.220.0)

Documentation

  • docs/ios-deployment.md: Comprehensive setup guide with all required GitHub secrets, deployment process explanation, and troubleshooting tips
  • docs/ios-deployment-quickstart.md: Quick reference guide with step-by-step commands and common workflows
  • docs/maintenance/deployment.md: Updated with platform-specific deployment sections

Deployment Comparison

Trigger Android Destination iOS Destination
v1.2.3-rc1 Play Store Internal TestFlight Internal
v1.2.3 Play Store Beta TestFlight Beta
Published Release Play Store Production App Store Production

Required Setup

Before this workflow can be used, the following GitHub secrets must be configured (see docs/ios-deployment.md for details):

  • Apple credentials: APPLE_ID, ITC_TEAM_ID, TEAM_ID
  • App Store Connect API key: APP_STORE_CONNECT_API_KEY
  • Code signing: IOS_CERTIFICATE_P12, IOS_CERTIFICATE_PASSWORD, IOS_PROVISION_PROFILE, KEYCHAIN_PASSWORD

Testing

The workflow YAML syntax has been validated. After secrets are configured, test with:

git tag v1.0.0-rc999 && git push --tags

Monitor the "Deploy to App Store" workflow in GitHub Actions and verify the build appears in TestFlight.

Benefits

✅ Consistent deployment experience across Android and iOS
✅ Automated releases reduce manual errors
✅ Same tagging strategy works for both platforms
✅ Manual promotion control for production releases
✅ Well-documented setup and troubleshooting

Closes #[issue_number] (if applicable)

Original prompt

Allow deploy Apple App Store in CI/CD same as Android by Fastlane
when tagging x.x.x-rc1 deploy to internal/test env
when tagging x.x.x deploy to beta
and manual trigger GitHub Action to promote from beta to production


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Oct 19, 2025
Co-authored-by: evan361425 <14554683+evan361425@users.noreply.github.com>
Copilot AI changed the title [WIP] Allow deploy to Apple App Store in CI/CD with Fastlane Add iOS App Store deployment via Fastlane matching Android workflow Oct 19, 2025
Copilot AI requested a review from evan361425 October 19, 2025 01:40
Copilot finished work on behalf of evan361425 October 19, 2025 01:40
@evan361425 evan361425 force-pushed the copilot/add-apple-app-store-deploy branch from 194fee4 to 002835e Compare October 20, 2025 12:28
@evan361425
Copy link
Owner

resolves #1

@evan361425 evan361425 linked an issue Nov 3, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS

2 participants