Deltaアップデート
このプラグインのためのインストールステップと完全なマークダウンガイドを含むセットアッププロンプトをコピーできます。
Capgo’s Live Update system can deliver updates faster and more efficiently by only sending the changed files, rather than the entire JS bundle.
特に、遅いまたはメートルネットワーク接続のユーザーにとっては、ダウンロードする必要があるデータの量を最小限に抑えることで、特に有益です。
A second benefit is when the app has large assets that change rarely, like images or videos, compared to zipped JS files, it will be downloaded only once.
How Delta (Manifest) Updates Work
How Delta (Manifest) Updates WorkDelta (manifest) updates in Capgo are handled by the Capgo plugin installed in your app. When you upload a new version of your app using the --delta flag, Capgo does the following:
- Each file in your build is uploaded individually.
- Checksums are generated for each file.
- A new JSON manifest is created, listing all files and their checksums.
- This manifest is uploaded to the Capgo database
When a device running your app checks for an update, the Capgo plugin receives the new manifest from the server. It compares this manifest to the one it currently has, identifying which files have changed based on the checksums and file paths.
The plugin then downloads only the changed files, rather than the entire JS bundle. It reconstructs the new version of the app by combining these downloaded files with the unchanged files it already has.
Delta (Manifest) のアップデートを有効にする
「Delta (Manifest) のアップデートを有効にする」のセクションCapgo アプリのために、Delta (manifest) のアップデートを有効にするには、単に次のフラグを使用して新しいバージョンをアップロードしてください: --delta ターミナル画面
npx @capgo/cli@latest bundle upload --delta__CAPGO_KEEP_0__ がインスタント アプリケーション モード ( autoUpdate 、または"atInstall", "onLaunch")に設定されている場合、 "always") in your capacitor.config、CLIはそれを検出します。非対話型環境では、Delta(マニフェスト)アップデートを自動的に送信し、対話型環境ではアップロードする前に確認を求めるよう指示します。 directUpdate レガシーコンフィグはまだ検出されます。 --no-delta __CAPGO_KEEP_0__を強制的にフルバンドルアップロードするには使用してください。
Deltaアップデートの制限事項
Deltaアップデートの制限事項- 空のファイル: CLIはログ
Ignoring empty file...空のファイルをDeltaマニフェストから除外します。アップロードを中断せずに、結果のバンドルを変更する可能性があるため、ゼロバイトファイルを含めることは避けるべきです。ゼロバイトファイルを含むDeltaバンドルパスを含めないでください。 - パス内のスペース: Deltaアップロードはファイルをアップロードする前に、パス内のスペースがある場合に失敗します。スペースを削除するためにファイルまたはディレクトリを再度名付けし、Deltaアップデートをアップロードする必要があります。
Delta(マニフェスト)アップデートの強制
Delta(マニフェスト)アップデートの強制すべてのアップロードがDelta (マニフェスト)更新であることを確認し、誤ってフルバンドルアップロードを許可しないようにするには、 --delta-only フラグ:
npx @capgo/cli@latest bundle upload --delta-only使用される場合、__CAPGO_KEEP_0__は個々のファイルのみをアップロードし、マニフェストを生成します。Delta (マニフェスト)更新をサポートしていないデバイスは更新をダウンロードできません。 --delta-only is used, Capgo will only upload individual files and generate a manifest. Any device that does not support Delta (manifest) updates will not be able to download the update.
常にDelta (マニフェスト)更新を使用し、フルバンドルアップロードを許可しない --delta-only CI/CDパイプラインを設定し、すべての自動アップロードがDelta (マニフェスト)更新であることを確認したい
- アプリが大きく帯域幅が制限されているため、アップロード/ダウンロードサイズを最小限に抑えたい
- フルバンドルアップロードを実行する必要がある場合
- Your app is large and bandwidth is constrained, so you need to minimize upload/download sizes
If you need to do a full bundle upload while --delta-only を設定した場合、単にアップロードコマンドを実行してください。 --delta-onlyが設定されている場合、上記の設定をオーバーライドし、必要に応じて完全なバンドルをプッシュできます。
トラブルシューティング
トラブルシューティングDelta (マニフェスト) の更新が機能しないように見えます (例: デバイスは常に小さな変更にも対処するためにフル JS バンドルをダウンロードしています)。
- Delta (マニフェスト) の更新が機能しないように見えます (例: デバイスは常に小さな変更にも対処するためにフル JS バンドルをダウンロードしています)。
--deltaが有効になっていることを確認してください。 - が有効になっていることを確認してください。
--delta-onlyが有効になっていることを確認してください。--deltaが有効になっていることを確認してください。 - Your device is running the latest version of the Capgo plugin
- Your device has a stable network connection and can reach the Capgo servers
You can also use the Capgo webapp to check the details of your last upload:
- Capgoの ウェブアプリ
- アプリをクリック
- 統計バーの
- バンドル数
- 最後のバンドルを選択
Partialバンドルの
If you continue to have trouble, please reach out to Capgo support for further assistance. They can check the server logs to confirm that your Delta (manifest) uploads are being processed correctly and that devices are receiving the updated manifests.
完了! --delta flag tells Capgo to perform the individual file uploads and manifest generation needed for Delta (manifest) updates.
Note that you need to use --delta every time you upload a new version that you want to be delivered as a Delta (manifest) update. If you omit the flag, Capgo will upload the entire JS bundle as a single file, and devices will download the whole bundle even if only a small part has changed.
Keep going from Delta updates
Section titled “Keep going from Delta updates”If you are using Delta updates を使用して Capgo Live Updates for the product workflow in Capgo Live Updates Overview for the implementation detail in Overview Features Capgoの機能詳細の実装について アップデートの動作 アップデートの動作の実装詳細について、そして アップデートの種類 アップデートの種類の実装詳細について。