✅ アプリ登録
Capgoにプロダクションチャンネルでアプリが登録されています。
インストール手順とこのプラグインの全マークダウンガイドを含むセットアップ用の質問をコピーできます。
CapgoのCLIは、ライブアップデートの設定を含むインタラクティブなオンボーディングを提供します。Capacitorアプリの場合、次のことが行われます。
Estimated time: 10-20 分 (インターネット接続速度とビルド時間に応じて変わります)
API キーとともにオンボーディングコマンドを実行してください:
npx @capgo/cli@latest init [APIKEY]ウェルカムメッセージが表示されます:
Capgo onboarding 🛫CLIは、13ステップのインタラクティブなガイドを提供します。
セットアップフェーズ (ステップ 1-6):
@capgo/capacitor-updater __CAPGO_KEEP_0__をアプリにインジェクトするテストフェーズ (ステップ 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 ✅")生産用のチャンネルが作成され、デフォルトに設定されます。このオプションは、ほとんどのユーザーにとって推奨されるオプションです。
No を選択した場合:
If you change your mind, run it for yourself with: "npm @capgo/cli@latest channel add production {appId} --default"後でチャンネルを作成および構成する必要があります。代わりに、次の方法を使用できます:
capacitor.config.ts ファイルsetChannel() 方法を使用して、ダイナミックにチャンネルを設定します。The CLI will install the @capgo/capacitor-updater plugin compatible with your Capacitor version.
❓ 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-immediatelyYesを選択すると:
autoUpdate: 'always' そして autoSplashscreen: true あなたの設定に追加されますcapacitor.config.ts 自動的に更新されますNoを選択すると:
capacitor.config.tsCLIは自動的に必要なcodeをメインのアプリケーションファイルにインジェクトします。
❓ 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 は次のことを行います。
Choose which platform to test with during onboarding.
📱 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 nextNow it’s time to test Capgo’s update system by making a visible change.
🎯 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 uploadDelta更新の際に即時適用モードが有効になっている場合に表示されるダイアログです。
💡 Instant updates are enabled in your config Delta updates send only changed files instead of the full bundle
❓ Enable delta updates for this upload? (Recommended with instant updates)成功:
✅ 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?あなたが「はい」を選択 あなたが「はい」を選択した場合、Step 13: 完了
Welcome onboard ✈️!Capgoのライブ更新をアプリに成功させました。
オンボーディングを完了すると、以下のことが実行されます。
✅ アプリ登録
Capgoにプロダクションチャンネルでアプリが登録されています。
✅ プラグインインストール
Capacitorのアップデートプラグインがインストールされ、設定されています。
✅ Code統合
codeの統合がアプリに追加されています。
✅ アップデートテスト
You’ve successfully deployed and received a live update
以降の更新の場合、使用してください:
npm run buildnpx @capgo/cli@latest bundle upload --channel=production以降のデプロイメントオプションについては、 ライブアップデートをデプロイ.
オンボーディングプロセスを中断した場合、いつでも再開できます:
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 は自動的にインジェクトすることができません。code
解決策: code を手動でメインファイルに追加してください。
import { CapacitorUpdater } from '@capgo/capacitor-updater'
CapacitorUpdater.notifyAppReady()問題: Capacitor のバージョンが v5 未満です。
解決策: Capacitor を v5 またはそれ以上にアップグレードしてください。
オンボーディングを完了した後は、以下のトピックを調べることができます。
ワンタイムセットアップチェックリスト
チャンネル、CI、デルタアップロードを一度設定して長期的な安定性を確保する
デプロイ更新
Capgo ダッシュボードから更新をデプロイする方法を学びます
更新タイプ
OTA更新の種類のすべてのリファレンス:適用タイミング、遅延条件、バージョンブロッキング、配信
CI/CD統合
CI/CDを使用して更新のデプロイを自動化する
チャンネル
複数のアップデート ストリームを管理する
暗号化
アップデートをエンドツーエンド暗号化で保護する
アップデートの動作
アップデートの適用時期と方法をカスタマイズする (直接、デルタなど)
初期設定中に問題が発生した場合:
「__CAPGO_KEEP_0__ オンボーディング ガイド」を使用している場合 「CLI オンボーディング ガイド」 ダッシュボードと「API オンボーディング ガイド」オペレーションを計画するには 「API オーバーヴィュー」 「API オーバーヴィュー」の実装詳細について 導入 導入の実装詳細について API キー API キーの実装詳細について デバイス デバイスの実装詳細について バンドル バンドルの実装詳細について