iOS release (Fastlane / ios_deployment)

This repo deploys iOS with Fastlane and the GitHub Actions workflow ios_deployment.

Prerequisites

  • macOS + Xcode (CI uses macos-26 with Xcode 26.3)
  • Access to App Store Connect + the signing/certificates repo used by match
  • Fastlane credentials / secrets are kept in GitHub Secrets and injected by .github/workflows/ios_deployment.yaml:
    • APPSTORE_KEY_ID
    • APPSTORE_ISSUER_ID
    • P8_AUTH_KEY (contents of the App Store Connect .p8 key)
    • APPLE_ID
    • ITUNES_TEAM_ID
    • APPSTORE_TEAM_ID
    • MATCH_PASSWORD
    • MATCH_REPO_KEY (SSH key used to access the match repo)
    • SENTRY_AUTH_TOKEN (optional but expected in CI)
    • DEEPLINKNOW_API_KEY, LUCRA_API_KEY, LUCRA_API_URL
    • Vars: BASE_URL
  1. Go to GitHub → Actions → ios-deployment
  2. Click Run workflow
  3. Select backend_branch:
    • release = production backend
    • main = qa backend
  4. Start the run and wait for it to finish

What the workflow does (high level):

  • Installs client/ dependencies and builds the web app
  • Creates .env.production based on backend_branch
  • Ensures Capacitor iOS platform exists and syncs plugins
  • Installs CocoaPods in client/ios/App
  • Moves Fastlane + iOS build inputs into client/ios/App
  • Writes fastlane/secretKey.p8 from the P8_AUTH_KEY secret
  • Runs the Fastlane lane: bundle exec fastlane ios release

Local fallback (only if CI is broken)

From client/fastlane/README.md, the local flow is supported but should be used only when needed. In CI, the secrets come from GitHub Secrets; for local runs you must provide equivalents yourself.

1) Install Ruby deps

From client/:

bundle install

2) Provide App Store Connect API key inputs

Fastlane expects:

  • APPSTORE_KEY_ID
  • APPSTORE_ISSUER_ID
  • fastlane/secretKey.p8 (the .p8 private key file)

Place the .p8 key at:

  • client/fastlane/secretKey.p8

3) Run the Fastlane lane

bundle exec fastlane ios release

This lane increments build number, runs match (readonly), builds the archive (gym), and uploads to TestFlight (pilot).

Verify in App Store Connect

  1. Open App Store Connect → My Apps → FoodFight → TestFlight
  2. Confirm the new build appears (processing can take time)

Troubleshooting

  • .p8 file not found
    • Ensure secretKey.p8 is created before running Fastlane:
      • CI: echo "$P8_AUTH_KEY" > fastlane/secretKey.p8
      • Local: copy the key to client/fastlane/secretKey.p8
  • Signing / provisioning issues
    • Ensure MATCH_PASSWORD and MATCH_REPO_KEY are valid and the match repo is reachable