Passer au contenu

Commencer

Commencer avec Capgo Cloud Construction and Créer your first iOS or Android Natif Construction in minutes.

Before you begin, ensure you have:

  • A Capacitor Application that builds successfully locally
  • Node.js 20 or higher installed
  • A Capgo Compte with an Actif subscription
  • Your app already registered in Capgo (run npx @capgo/cli@latest app add if not)
  • Construction credentials configured (certificates, keystores) - see below

⚠️ Setup Credentials First

Required before building: You must configure your build credentials (certificates for iOS, keystores for Android).

Configuration Credentials →

  1. Configuration Construction Credentials

    Before you can Construction, you need to Enregistrer your credentials locally:

    For iOS:

    Terminal window
    npx @capgo/cli build credentials save \
    --platform ios \
    --certificate ./cert.p12 \
    --p12-password "password" \
    --provisioning-profile ./profile.mobileprovision \
    --apple-key ./AuthKey.p8 \
    --apple-key-id "KEY123" \
    --apple-issuer-id "issuer-uuid" \
    --apple-team-id "team-id"

    For Android:

    Terminal window
    npx @capgo/cli build credentials save \
    --platform android \
    --keystore ./release.keystore \
    --keystore-alias "my-key" \
    --keystore-key-password "key-pass" \
    --keystore-store-password "store-pass"

    See the full credentials Guide for details.

  2. Verify Local Construction

    First, ensure your Application builds locally without errors:

    Terminal window
    # Build your web assets
    npm run build
    # Sync with Capacitor
    npx cap sync
    # Test local build (optional but recommended)
    npx cap open ios # For iOS
    npx cap open android # For Android
  3. Authenticate with Capgo

    Set your Capgo Clé API (if not already configured):

    Terminal window
    npx @capgo/cli@latest login

    Or set the environment variable:

    Terminal window
    export CAPGO_TOKEN=your_api_key_here
  4. Run Your First Construction

    Démarrer with an Android Débogage Construction (fastest to Test):

    Terminal window
    npx @capgo/cli@latest build com.example.app \
    --platform android \
    --build-mode debug

    You’ll see real-time Journaux as your Construction progresses:

    ✔ Creating build job...
    ✔ Uploading project (15.2 MB)...
    ✔ Build started
    📝 Build logs:
    → Installing dependencies...
    → Running Gradle build...
    → Signing APK...
    ✔ Build succeeded in 3m 42s
  5. Vérifier Construction Status

    The CLI will automatically poll and display the Construction status. Once Terminé, you’ll see:

    • Construction time
    • Succès/failure status
    • Application submitted to Application Store/Play Store (if credentials configured)

When you run the Construction Commande, here’s what happens:

graph LR
A[Your Machine] -->|1. Zip Project| B[Local Temp]
B -->|2. Upload| C[Capgo Cloud]
C -->|3. Build| D[Build Server]
D -->|4. Logs Stream| A
D -->|5. Cleanup| E[Auto Delete]
  1. Local Preparation - Your project is zipped (excluding node_modules and dotfiles)
  2. Télécharger - The zip is uploaded to secure cloud storage (Cloudflare R2)
  3. Construction Execution - Your Application builds on dedicated infrastructure
  4. Journal Streaming - Real-time Journaux stream to your Terminal via Server-Sent Events
  5. Automatic Cleanup - Construction artifacts are deleted (Android: instant, iOS: 24 hours)

Once you’ve verified the process works, Créer a Production Construction:

Terminal window
npx @capgo/cli@latest build com.example.app \
--platform android \
--build-mode release

You’ll need to configure signing credentials first. See Android Construction Configuration.

Terminal window
npx @capgo/cli@latest build com.example.app \
--platform ios \
--build-mode release

iOS builds require signing certificates and provisioning profiles. See iOS Construction Configuration.

Important: Capgo Cloud Build only builds the native parts of your app (iOS and Android native code).

You are responsible for:

  • Building your web assets (npm run build)
  • Running npx cap sync before the build
  • Ensuring all dependencies are in package.json

We handle:

  • Natif iOS compilation (Xcode, Fastlane)
  • Natif Android compilation (Gradle)
  • Code signing
  • Application Store submission (if configured)

Construction time is measured from Démarrer to completion:

  • Android: Typically 3-5 minutes (1× billing multiplier)
  • iOS: Typically 5-10 minutes (2× billing multiplier due to Mac hardware costs)

You only pay for actual Construction time used. No hidden fees.

Ajouter to your GitHub Actions workflow:

- name: Build native app
env:
CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }}
run: |
npm run build
npx cap sync
npx @capgo/cli@latest build ${{ secrets.APP_ID }} \
--platform both \
--build-mode release

Test builds locally before committing:

Terminal window
# Quick debug build for testing
npm run build && npx cap sync
npx @capgo/cli@latest build com.example.app \
--platform android \
--build-mode debug

Construction for both platforms simultaneously:

Terminal window
npx @capgo/cli@latest build com.example.app \
--platform both \
--build-mode release

Now that you’ve created your first Construction: