⚠️ Setup iOS Credentials First
Required: You must save your iOS credentials before building.
Konten ini belum tersedia dalam bahasa Anda.
Build and submit iOS apps to TestFlight and the App Store using Capgo’s dedicated Mac infrastructure.
⚠️ Setup iOS Credentials First
Required: You must save your iOS credentials before building.
iOS builds run on dedicated Mac machines (Scaleway Mac minis M4) provisioned on-demand:
Before building for iOS, you need:
npx cap open iosYou’ll need one of these certificate types depending on your build:
| Build Type | Certificate Required | Provisioning Profile |
|---|---|---|
| Development | Apple Development | Development Profile |
| Ad Hoc | Apple Distribution | Ad Hoc Profile |
| App Store | Apple Distribution | App Store Profile |
For automatic TestFlight submission, create an API key:
.p8 file (you can only download it once!)Set these credentials before building:
# iOS Signing (Required)BUILD_CERTIFICATE_BASE64="<base64-encoded-p12-certificate>"BUILD_PROVISION_PROFILE_BASE64="<base64-encoded-mobileprovision>"P12_PASSWORD="<certificate-password>"
# App Store Connect API (for submission)APPLE_KEY_ID="ABC1234567"APPLE_ISSUER_ID="00000000-0000-0000-0000-000000000000"APPLE_KEY_CONTENT="<base64-encoded-p8-key>"
# Additional ConfigAPP_STORE_CONNECT_TEAM_ID="1234567890"APPLE_PROFILE_NAME="App Store com.example.app"Certificate (.p12):
base64 -i YourCertificate.p12 | pbcopyProvisioning Profile (.mobileprovision):
base64 -i YourProfile.mobileprovision | pbcopyApp Store Connect Key (.p8):
base64 -i AuthKey_ABC1234567.p8 | pbcopyThe base64 string is now in your clipboard - paste it into your environment variable or CI/CD secrets.
npx @capgo/cli@latest build com.example.app \ --platform ios \ --build-mode debugThis creates a development build that can be installed on registered devices.
npx @capgo/cli@latest build com.example.app \ --platform ios \ --build-mode releaseThis creates an App Store build and automatically submits to TestFlight if you have the App Store Connect API credentials configured.
name: Build iOS App
on: push: branches: [main]
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20'
- name: Install dependencies run: npm ci
- name: Build web assets run: npm run build
- name: Sync Capacitor run: npx cap sync ios
- name: Build iOS app env: CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }} BUILD_CERTIFICATE_BASE64: ${{ secrets.IOS_CERTIFICATE }} BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.IOS_PROVISION_PROFILE }} P12_PASSWORD: ${{ secrets.P12_PASSWORD }} APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }} APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }} APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }} APP_STORE_CONNECT_TEAM_ID: ${{ secrets.TEAM_ID }} run: | npx @capgo/cli@latest build ${{ secrets.APP_ID }} \ --platform ios \ --build-mode releaseMachine Provisioning (1-2 minutes)
User Isolation (~10 seconds)
job-<jobId>/Users/job-<jobId>Project Setup (~30 seconds)
Fastlane Build (3-8 minutes)
App Store Submission (1-2 minutes, if configured)
Cleanup (immediate)
Machine Dismissal (after 24 hours)
Our iOS build environment includes:
Typical iOS build times:
| Build Type | First Build | Subsequent Builds* |
|---|---|---|
| Debug | 5-7 minutes | 4-6 minutes |
| Release | 7-10 minutes | 5-8 minutes |
*Subsequent builds may be faster if the same machine is reused within the 24-hour window.
“Code signing failed”
“Provisioning profile doesn’t include signing certificate”
“App Store Connect authentication failed”
“Build timeout after 10 minutes”
All build logs are streamed in real-time. Watch for these key phases:
✔ Machine assigned: m-abc123→ Creating user: job-abc123→ Installing CocoaPods dependencies...→ Building iOS app...→ Code signing with certificate...→ Uploading to App Store Connect...✔ Build succeededIf a build fails, the error will be clearly shown in the logs with the specific Fastlane/Xcode error message.
Always ensure your iOS build works locally before using cloud build:
npx cap open ios# Build in XcodeNever commit certificates or keys to your repository. Always use:
For faster builds, ensure your package.json and Podfile.lock are committed to version control.
Keep an eye on build duration to optimize costs:
# The CLI shows build time at the endBuild succeeded in 6m 42s (13.4 billing minutes at 2× rate)