✅ アプリが登録されました
アプリは実稼働チャネルを使用して Capgo に登録されています
Capgo CLI は、Capacitor アプリのライブ アップデートを設定するインタラクティブなオンボーディングを提供します。あなたは次のことを行うでしょう:
推定時間: 10 ~ 20 分 (インターネットの速度と構築時間によって異なります)
API キーを使用してオンボーディング コマンドを実行します。
npx @capgo/cli@latest init [APIKEY]ウェルカム メッセージが表示されます。
Capgo onboarding 🛫CLI では、13 の対話型ステップを案内します。
セットアップフェーズ (ステップ 1 ~ 6):
@capgo/capacitor-updater プラグインをインストールしますテスト段階 (ステップ 7 ~ 12):
完了 (ステップ 13):
CLI は開発環境をチェックして、必要なツールがインストールされていることを確認します。
チェック内容:
考えられる結果:
✅ 両方の環境が見つかりました:
✅ Xcode detected - iOS development ready✅ Android SDK detected - Android development ready⚠️ 環境が見つかりません:
⚠️ Xcode not found⚠️ Android SDK not found❌ No development environment detected
📱 To develop mobile apps with Capacitor, you need: • For iOS: Xcode (macOS only) - https://developer.apple.com/xcode/ • For Android: Android Studio - https://developer.android.com/studioよくある質問:
CLI により Capgo にログインし、アプリがアカウントに追加されます。
(spinner) Running: npm @capgo/cli@latest login ***Login Done ✅
❓ Add {appId} in Capgo?アプリ ID がすでに取得されている場合:
CLI は代替案を提案します。
❌ App ID "com.example.app" is already taken💡 Here are some suggestions: 1. com.example.app2 2. com.example.app3 3. com.example.app.new 4. com.example.app.app
❓ What would you like to do?提案を選択するか、カスタム アプリ ID を入力できます。
チャネルを使用すると、アプリのさまざまな更新ストリームを管理できます。
❓ Create default channel production for {appId} in Capgo?はいを選択した場合:
(spinner) Running: npm @capgo/cli@latest channel add production {appId} --defaultChannel add Done ✅ (or "Channel already added ✅")実稼働チャネルが作成され、デフォルトとして設定されます。これは、ほとんどのユーザーにとって推奨されるオプションです。
「いいえ」を選択した場合:
If you change your mind, run it for yourself with: "npm @capgo/cli@latest channel add production {appId} --default"後でチャネルを手動で作成して構成する必要があります。あるいは、次のこともできます。
capacitor.config.ts ファイルにチャンネルを設定しますsetChannel() メソッドを使用してチャネルを動的に設定しますCLI は、Capacitor バージョンと互換性のある @capgo/capacitor-updater プラグインをインストールします。
❓ Automatic Install "@capgo/capacitor-updater" dependency in {appId}?バージョンの互換性:
@capgo/capacitor-updater v5 をインストールします@capgo/capacitor-updater v6 をインストールします@capgo/capacitor-updater v7 をインストールします即時更新オプション:
インストール後、次のことを尋ねられます。
❓ Do you want to set instant updates in {appId}? Read more: https://capgo.app/docs/live-updates/update-behavior/#applying-updates-immediatelyはいを選択した場合:
directUpdate: 'always' と autoSplashscreen: true が構成に追加されますcapacitor.config.ts は自動的に更新されます「いいえ」を選択した場合:
capacitor.config.ts を変更することで、後でいつでもインスタント アップデートを有効にできます。CLI は、必要なコードをメイン アプリケーション ファイルに自動的に挿入します。
❓ Automatic Add "CapacitorUpdater.notifyAppReady()" code and import in {appId}?追加される内容:
import { CapacitorUpdater } from '@capgo/capacitor-updater'
CapacitorUpdater.notifyAppReady()プロジェクト タイプの検出:
plugins/capacitorUpdater.client.ts を作成しますエンドツーエンドの暗号化により、アップデートに追加のセキュリティ層が追加されます。
🔐 End-to-end encryption ✅ Use this for: Banking, healthcare, or apps with legal encryption requirements ⚠️ Note: Makes debugging harder - skip if you don't need it
❓ Enable end-to-end encryption for {appId} updates?暗号化を有効にすると、CLI は次のようになります:
オンボーディング中にテストするプラットフォームを選択します。
📱 Platform selection for onboarding This is just for testing during onboarding - your app will work on all platforms
❓ Which platform do you want to test with during this onboarding? Options: - iOS - AndroidCLI はアプリを構築し、Capacitor と同期します。
❓ Automatic build {appId} with "npm run build"?何が起こるか:
npx cap sync {platform} を実行しますビルド スクリプトが見つからない場合:
ビルドをスキップするか、package.json にビルド スクリプトを追加するかを尋ねられます。
デバイスまたはシミュレーターでアプリの初期バージョンをテストします。
❓ Run {appId} on {PLATFORM} device now to test the initial version?はいを選択した場合:
(spinner) Running: npx cap run {platform}(device picker appears)App started ✅📱 Your app should now be running on your {platform} device with Capgo integrated🔄 This is your baseline version - we'll create an update next次に、目に見える変更を加えて Capgo の更新システムをテストします。
🎯 Now let's test Capgo by making a visible change and deploying an update!
❓ How would you like to test the update? Options: - Auto: Let Capgo CLI make a visible change for you - Manual: I'll make changes myself自動モード: CLI はファイルを自動的に変更して、表示されるテスト バナーを追加したり、変更を加えたりします。
手動モード: 独自の変更を加えます (テキスト、色の変更、要素の追加など)。
バージョンの処理:
❓ How do you want to handle the version for this update? Options: - Auto: Bump patch version ({currentVersion} → {nextVersion}) - Manual: I'll provide the version number変更を加えて構築:
❓ Build {appId} with changes before uploading?更新されたアプリ バンドルを Capgo にアップロードします。
❓ Upload the updated {appId} bundle (v{version}) to Capgo?CLI は次のように実行されます。
npx @capgo/cli@latest bundle uploadデルタ更新プロンプト (直接更新が有効な場合):
💡 Direct Update (instant updates) is enabled in your config Delta updates send only changed files instead of the full bundle
❓ Enable delta updates for this upload? (Recommended with Direct Update)成功:
✅ Update v{version} uploaded successfully!🎉 Your updated bundle is now available on Capgoアップデートが実際に行われる様子を見てみましょう!
🧪 Time to test the Capgo update system!📱 Go to your device where the app is runningインスタントアップデートの場合:
🔄 IMPORTANT: Background your app (swipe up/press home button) and then reopen it⏱️ The update should be downloaded and applied automatically標準アップデートの場合:
📱 With standard updates, you will need to: 1. Background the app (swipe up/press home button) to start download 2. Wait a few seconds for download to complete 3. Background and foreground again to see the update監視ログ:
❓ Monitor Capgo logs to verify the update worked?はい を選択すると、更新プロセスを示すライブ ログがデバイスから表示されます。
Welcome onboard ✈️!おめでとうございます!アプリの Capgo ライブ アップデートが正常に設定されました。
オンボーディングが完了すると、以下が得られます。
✅ アプリが登録されました
アプリは実稼働チャネルを使用して Capgo に登録されています
✅ プラグインがインストールされています
Capacitor アップデータ プラグインがインストールされ、設定されている
✅ コードの統合
統合コードがアプリに追加されます
✅ アップデートテスト済み
正常にデプロイされ、ライブアップデートを受け取りました
以降の更新には、次を使用します。
npm run buildnpx @capgo/cli@latest bundle upload --channel=productionその他の展開オプションについては、「ライブ アップデートの展開」(/docs/getting-started/deploy/) を参照してください。
オンボーディング プロセスを終了しても、いつでも再開できます。
npx @capgo/cli@latest init [APIKEY]次のことがわかります:
You have already got to the step {stepNumber}/13 in the previous session❓ Would you like to continue from where you left off?問題: Xcode も Android SDK も検出されません。
解決策:
問題: アプリ ID はすでに登録されています。
解決策: 提案された代替案のいずれかを選択するか、逆ドメイン表記でカスタム アプリ ID を入力します。
問題: package.json にビルド スクリプトが見つかりません。
解決策: package.json にビルド スクリプトを追加します。
{ "scripts": { "build": "your-build-command" }}問題: CLI は統合コードを自動的に挿入できません。
解決策: コードをメイン ファイルに手動で追加します。
import { CapacitorUpdater } from '@capgo/capacitor-updater'
CapacitorUpdater.notifyAppReady()問題: Capacitor のバージョンは v5 未満です。
解決策: Capacitor を v5 以降にアップグレードします。
オンボーディングが完了したので、次のトピックを検討してください。
アップデートの展開
Capgo ダッシュボードからアップデートを展開する方法を学びます
更新の種類
すべての OTA 更新タイプのリファレンス: 適用タイミング、遅延条件、バージョン ブロック、および配信
CI/CDの統合
CI/CD を使用して更新プログラムのデプロイを自動化する
Channels
チャネルを使用して複数の更新ストリームを管理する
Encryption
エンドツーエンドの暗号化でアップデートを保護します
更新動作
アップデートをいつどのように適用するかをカスタマイズします (直接、デルタなど)。
オンボーディング中に問題が発生した場合: