Type of change
Update Existing Automation
What is changing
Work Being Done
When a new iOS version number is uploaded to TestFlight for the first time, Apple requires Beta App Review before the build can be distributed to external testers. This causes the upload_to_testflight step (with distribute_external: true) to fail or timeout, resulting in false build failures even though the build was successfully uploaded.
This was observed in this workflow run where the build retried 3 times over ~60 minutes before failing, each time hitting the altool 409 "Upload limit reached" error compounded by the beta review gate.
Changes:
-
VAMobile/ios/fastlane/Fastfile - Modify upload_tf to separate upload from external distribution:
- Upload with
distribute_external: false (always succeeds)
- Check via Spaceship API if the version has already passed Beta App Review
- If approved: distribute immediately (no behavior change for same-version builds)
- If pending: submit for beta review, trigger a new distribute workflow, and succeed the build
- Add new
distribute lane that polls App Store Connect for review approval and distributes once approved
- Add helper methods for checking review status, distributing to groups, and submitting for review
-
.github/workflows/build_ios.yml - Add actions: write permission and GH_TOKEN env var so fastlane can trigger the distribute workflow via gh CLI
-
.github/workflows/distribute_testflight.yml (new) - Lightweight workflow triggered automatically when beta review is pending, or manually via workflow_dispatch. Polls for approval (every 5 min, up to 60 min), distributes, and notifies Slack.
Acceptance Criteria
Type of change
Update Existing Automation
What is changing
Work Being Done
When a new iOS version number is uploaded to TestFlight for the first time, Apple requires Beta App Review before the build can be distributed to external testers. This causes the
upload_to_testflightstep (withdistribute_external: true) to fail or timeout, resulting in false build failures even though the build was successfully uploaded.This was observed in this workflow run where the build retried 3 times over ~60 minutes before failing, each time hitting the
altool409 "Upload limit reached" error compounded by the beta review gate.Changes:
VAMobile/ios/fastlane/Fastfile- Modifyupload_tfto separate upload from external distribution:distribute_external: false(always succeeds)distributelane that polls App Store Connect for review approval and distributes once approved.github/workflows/build_ios.yml- Addactions: writepermission andGH_TOKENenv var so fastlane can trigger the distribute workflow viaghCLI.github/workflows/distribute_testflight.yml(new) - Lightweight workflow triggered automatically when beta review is pending, or manually via workflow_dispatch. Polls for approval (every 5 min, up to 60 min), distributes, and notifies Slack.Acceptance Criteria
macos-latest(notmacos-26-xlarge) to minimize cost