This document provides step-by-step instructions to complete the TestFlight deployment setup.
This project separates iOS building from TestFlight deployment:
- Purpose: Build verification only, NO deployment
- Use for: Testing builds, verifying code compiles, creating test artifacts
- No secrets required
- Faster: ~20-30 minutes
- Output: Unsigned .app file (7-day retention)
- Purpose: Complete deployment to TestFlight
- Use for: Deploying to testers, release candidates
- Requires: TestFlight environment secrets (see below)
- Longer: ~30-45 minutes
- Output: Signed IPA + dSYMs (30-day retention) + TestFlight build
- Created
TestFlightGitHub environment - Created iOS Build workflow for verification (
.github/workflows/ios-build.yml) - Created iOS TestFlight deployment workflow (
.github/workflows/ios-testflight.yml) - Configured npm and CocoaPods caching
- Documented all required secrets
- Updated README.md and CLAUDE.md with deployment instructions
- Separated build verification from deployment for cost optimization
All secrets must be added to the TestFlight GitHub environment (not repository secrets).
How to add secrets:
- Go to: https://github.com/softwareone-platform/mpt-mobile-platform/settings/environments
- Click on TestFlight environment
- Scroll to Environment secrets
- Click Add secret for each secret below
Important Note on Secrets:
- GitHub secrets are read-only and cannot be copied between repositories
- All secrets must be recreated in the new TestFlight environment
- The original secret values are available locally (contact team for access)
- Reference PoC repository for secret names: https://github.com/softwareone-platform/mpt-mobile-reactnative-poc/settings/secrets/actions
Required Secrets List:
APP_STORE_CONNECT_API_KEY_ID
APP_STORE_CONNECT_ISSUER_ID
APP_STORE_CONNECT_API_KEY_CONTENT
IOS_DISTRIBUTION_CERTIFICATE_P12_BASE64
IOS_DISTRIBUTION_CERTIFICATE_PASSWORD
IOS_PROVISIONING_PROFILE_BASE64
PROVISIONING_PROFILE_SPECIFIER
AUTH0_DOMAIN_TEST
AUTH0_CLIENT_ID_TEST
AUTH0_AUDIENCE_TEST
AUTH0_API_URL_TEST
AUTH0_DOMAIN_PROD
AUTH0_CLIENT_ID_PROD
AUTH0_AUDIENCE_PROD
AUTH0_API_URL_PROD
These variables support dynamic environment switching for App Store reviewers.
On lower environments (test, qa), REVIEWER_EMAILS should be empty.
On prod, set REVIEWER_EMAILS to the designated reviewer email(s).
The REVIEW_ENV_* values should correspond with the QA environment.
Variables (public):
REVIEW_ENV_AUTH0_DOMAIN
REVIEW_ENV_AUTH0_AUDIENCE
REVIEW_ENV_AUTH0_API_URL
REVIEWER_EMAILS # comma-separated list of reviewer email addresses
Secrets (encrypted):
REVIEW_ENV_AUTH0_CLIENT_ID
Variables (public):
LOG_LEVEL # debug, info, warn, or error
Recommended values per environment:
| Environment | LOG_LEVEL |
Rationale |
|---|---|---|
test |
info |
Standard logging |
qa |
info |
Standard logging |
prod |
info |
Standard logging |
Note: Can be changed per environment to
debug,warn, orerroras needed. Seeapp/.env.examplefor all options.
Keeper Vault reference: Store these values in the shared Keeper Vault under the mobile app's environment config:
Keeper > Mobile App > test > LOG_LEVEL→infoKeeper > Mobile App > qa > LOG_LEVEL→infoKeeper > Mobile App > prod > LOG_LEVEL→info
Total: 21 secrets/variables required
To require manual approval before deployment:
- Go to: https://github.com/softwareone-platform/mpt-mobile-platform/settings/environments
- Click on TestFlight environment
- Under Deployment protection rules:
- Check Required reviewers
- Add users who should approve deployments (CODEOWNERS)
- Recommended: Add at least one senior developer or team lead
- Under Deployment branches:
- Select Protected branches only to only allow deployments from
main
- Select Protected branches only to only allow deployments from
- Click Save protection rules
Before first deployment, verify these values in .github/workflows/ios-testflight.yml:
env:
NODE_VERSION: '20' # ✅ Correct
XCODE_VERSION: '16.0' # ✅ Update if needed
APP_BUNDLE_ID: 'com.softwareone.marketplaceMobile' # ✅ Correct
DEVELOPMENT_TEAM: '47PY6J2KQC' # ✅ Correct
APP_STORE_APP_ID: '6752612555' # ✅ Correct (same as Flutter app)Once secrets are configured:
- Go to Actions tab
- Select iOS TestFlight Deployment
- Click Run workflow
- Configure:
- Version bump:
build(safest for first test) - Environment:
test
- Version bump:
- Click Run workflow
- Monitor the workflow execution (~30-45 minutes)
- Check for any errors in the logs
- Verify the build appears in App Store Connect → TestFlight after 10-15 minutes
Issue: "Failed to create API key file"
- Solution: Verify
APP_STORE_CONNECT_API_KEY_CONTENTis correctly base64-encoded
Issue: "Certificate import failed"
- Solution: Verify
IOS_DISTRIBUTION_CERTIFICATE_P12_BASE64is correctly base64-encoded - Verify
IOS_DISTRIBUTION_CERTIFICATE_PASSWORDis correct
Issue: "Provisioning profile not found"
- Solution: Verify
PROVISIONING_PROFILE_SPECIFIERexactly matches the profile name - Verify
IOS_PROVISIONING_PROFILE_BASE64is correctly base64-encoded
Issue: "Upload to TestFlight failed"
- Solution: Check App Store Connect API key permissions (should be Admin or Developer)
- Verify
APP_STORE_CONNECT_ISSUER_IDis correct
-
Verify in App Store Connect:
- Go to: https://appstoreconnect.apple.com/apps/6752612555/testflight/ios
- Confirm the build appears
- Check for any processing errors
-
Add Internal Testers:
- Go to TestFlight → Internal Testing
- Add testers from your organization
- Provide release notes
-
Test the App:
- Download TestFlight app on iOS device
- Install and test the build
- Report any issues
-
Monitor Future Deployments:
- Each deployment creates a git tag (e.g.,
v4.0.0-build123) - Build number auto-increments in
app.json - IPA and dSYMs available as artifacts for 30 days
- Each deployment creates a git tag (e.g.,
- TestFlight Environment: https://github.com/softwareone-platform/mpt-mobile-platform/settings/environments
- Actions Tab: https://github.com/softwareone-platform/mpt-mobile-platform/actions
- App Store Connect: https://appstoreconnect.apple.com/apps/6752612555
- PoC Secrets (for copying): https://github.com/softwareone-platform/mpt-mobile-reactnative-poc/settings/secrets/actions
- Deployment guide (test → QA → prod): DEPLOYMENT_GUIDE.md
- Workflow file: ios-testflight.yml
- README: README.md
Once TestFlight deployment is working:
- Consider setting up external testing groups
- Implement automated release notes from git commits
- Consider notification integration (Slack, Teams) for successful deployments
- Document internal testing procedures
- Plan production App Store submission workflow (separate from TestFlight)