From ae7f54699b66d6436510757c0b6a762f834b08cb Mon Sep 17 00:00:00 2001 From: Floyd Kim Date: Tue, 25 Aug 2026 22:14:00 +0900 Subject: [PATCH 1/3] docs: pull the diff update guide out of the README Sections 4-2 and 6 between them carried the whole story of publishing a patch update: the build hook for each platform, how to archive what it exports, how to release against it, and what asset diffs need on top. Both leave the install flow. Section 4-2 goes entirely, since asset diffs have nothing to do with the wrapper section 4 sets up, and section 6 becomes a pointer named after the topic rather than after one step of it. docs/diff-updates.md holds the guide in the order a reader meets it: the two kinds of difference a release can offer, exporting the embedded bundle, then asset diff archives. The advantages list at the top gains diff updates, which it never mentioned, and links to the guide. Inbound links follow the content: cli/README.md, cli/README.ko.md and both telemetry callback documents now point at it. --- README.md | 135 +++-------------------------- cli/README.ko.md | 2 +- cli/README.md | 2 +- docs/diff-updates.md | 152 +++++++++++++++++++++++++++++++++ docs/telemetry-callbacks.ko.md | 2 +- docs/telemetry-callbacks.md | 2 +- 6 files changed, 166 insertions(+), 129 deletions(-) create mode 100644 docs/diff-updates.md diff --git a/README.md b/README.md index 20a93810..f3104a6d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ - **No API Server Needed** โ€“ Use static hosting solutions (e.g., AWS S3) without maintaining additional API servers. - **Familiar API** โ€“ Built on `microsoft/react-native-code-push`, with the native module migrated to TurboModule. - **Flexible Deployment** โ€“ Implement your own release workflow, giving you complete control over the deployment process. +- **Diff Updates** โ€“ Publish [binary patch and asset diff releases](docs/diff-updates.md) so a client downloads the difference from what it already holds, not the whole bundle. ### ๐Ÿš€ New Architecture support @@ -300,56 +301,6 @@ See [Telemetry callbacks](docs/telemetry-callbacks.md) for what each one receive register them. -#### 4-2. Asset Diff Archives - -A release published with a binary patch can carry **asset diff archives** as well - one per -recently released version. A diff archive holds the patch of the JS bundle, only the assets -that version does not already have, and a manifest of the files it has to drop. The client -copies the update it already has installed, applies those, and ends up holding exactly the -contents of the full archive. - -A client tries the archives in this order and stops at the first one it can install: - -| Order | Archive | Available when | -|---|---|---| -| 1 | Asset diff | the release was diffed against the update the client is running. | -| 2 | Binary patch | always. It is built against the bundle in the app binary, which every client has. | -| 3 | Full | always. It needs nothing installed. | - -There are two exceptions to this order. - -**Not every client tries all three.** One with no asset diff to use - it is running the -bundle in the app binary, or an update this release was not diffed against - starts at the -binary patch. - -**A failed asset diff does not always reach the binary patch.** It moves on to that archive -only when the diff failed on its asset side: the merge with the installed update failing -(`asset_merge_failed`), or the merged contents failing the package hash -(`package_verification_failed`). Anything else the diff fails on lives in the bundle patch -both archives carry, so the binary patch would fail there the same way and the client goes -straight to the full archive. - -`onUpdateArchiveResult` reports every archive that was tried - see -[Telemetry callbacks](docs/telemetry-callbacks.md#what-onupdatearchiveresult-reports). - -Diff archives are published only when all three of these hold: - -- the release is a binary patch release (`release --binary-bundle-path`), -- `code-push.config.ts` implements `bundleDownloader`, so the CLI can fetch the earlier releases to diff against, -- `--diff-base-count` is greater than `0` (it defaults to `3`). - -```ts -bundleDownloader: async (archive, platform, identifier = 'staging') => { - const downloadedFilePath = path.join(os.tmpdir(), archive.packageHash); - const storageKey = `bundles/${platform}/${identifier}/full-bundle/${archive.packageHash}`; - // fetch storageKey from your storage (S3, Supabase, ...) to downloadedFilePath - return { downloadedFilePath }; -}, -``` - -See [Asset diff archives](cli/README.md#asset-diff-archives) for what the release publishes. - - ### 5. Configure the CLI Tool > [!TIP] @@ -358,7 +309,7 @@ See [Asset diff archives](cli/README.md#asset-diff-archives) for what the releas **(1) Create a `code-push.config.ts` file in the root directory of your project.** Then, implement three functions to upload the bundle file and create/update the release history, -plus an optional fourth one - `bundleDownloader` - if you publish [asset diff archives](#4-2-asset-diff-archives). +plus an optional fourth one - `bundleDownloader` - if you publish [asset diff archives](docs/diff-updates.md#asset-diff-archives). The CLI tool uses these functions to release CodePush updates and manage releases. (These functions are not used at runtime by the library.) @@ -464,82 +415,16 @@ module.exports = Config; ``` -### 6. Export the Embedded Bundle (Optional) - -Only needed if you want to release **binary patch updates** (`release --binary-bundle-path`). -A binary patch is the difference between the update and the JS bundle that is already -inside the installed app, so releasing one means holding on to that bundle: the exact -bytes the build you shipped to the store embedded. +### 6. Diff Updates (Optional) -The library ships a hook for each platform that copies the freshly compiled bundle out of -the build, together with a `binary-patch-base.json` record describing it. - -**Android** - apply the Gradle script in your app module's `android/app/build.gradle`: - -```groovy -apply plugin: "com.android.application" -apply plugin: "com.facebook.react" - -react { - // ... -} +In place of the full archive, a release can offer a binary patch computed against the JS +bundle inside the app binary. A release that carries one can also carry an asset diff, for a +client running one of the recent updates the release was diffed against. Both need a build +hook that copies the JS bundle out of your store build; asset diffs also need a +`bundleDownloader` in `code-push.config.ts`. -apply from: "../../node_modules/@bravemobile/react-native-code-push/android/codepush-export.gradle" -``` - -The line can go anywhere in the file (if you use `ext.codePushExportDir`, set it before the -`apply from:` line). Every variant that bundles JS then exports to -`android/app/build/codepush/embedded-bundle//` after it is bundled. Pass -`-PcodePushExportDir=` (or set `ext.codePushExportDir`) to export somewhere else; the -`` directory is appended either way. - -**iOS** - call the export script at the end of the **"Bundle React Native code and images"** -build phase. In Xcode, open that phase -in your app target's **Build Phases** tab and append the last line below to its script: - -```bash -/bin/sh -c "\"$WITH_ENVIRONMENT\" \"$REACT_NATIVE_XCODE\"" - -"$SRCROOT/../node_modules/@bravemobile/react-native-code-push/scripts/export-embedded-bundle.sh" -``` - -The export lands in `$BUILD_DIR/codepush/embedded-bundle/$CONFIGURATION-$PLATFORM_NAME/`. -Set the `CODEPUSH_EXPORT_DIR` environment variable to export somewhere else; the -`$CONFIGURATION-$PLATFORM_NAME` directory is appended either way. - -**Archive the export per binary release.** Whatever pipeline builds your store binary -should keep that build's export somewhere durable, organized by binary version, so a later -release can fetch the bundle that matches the binary it targets: - -```bash -# Android, after ./gradlew :app:assembleRelease -aws s3 cp --recursive \ - android/app/build/codepush/embedded-bundle/release \ - "s3://your-bucket/binaries/android/$BINARY_VERSION/" - -# iOS - point the export at a path the pipeline knows, since $BUILD_DIR only exists inside the build -export CODEPUSH_EXPORT_DIR="$PWD/codepush-export" -xcodebuild -workspace ios/YourApp.xcworkspace -scheme YourApp -configuration Release archive # ... -aws s3 cp --recursive \ - "$CODEPUSH_EXPORT_DIR/Release-iphoneos" \ - "s3://your-bucket/binaries/ios/$BINARY_VERSION/" -``` - -To release a patch later, download the export and pass the bundle's path to -`--binary-bundle-path`: - -```bash -aws s3 cp --recursive "s3://your-bucket/binaries/android/1.0.0/" ./binary/ -npx code-push release -b 1.0.0 -v 1.0.1 -p android \ - --binary-bundle-path ./binary/index.android.bundle -``` - -`release` also uses the record to verify the base bundle it was handed - see -[Verifying the base bundle](cli/README.md#verifying-the-base-bundle) for details. - -> [!NOTE] -> Applying these hooks automatically through the Expo config plugin (`app.plugin.js`) is -> not implemented yet. +See [Diff updates](docs/diff-updates.md) for the hooks, what to keep per binary version, and +how a client picks an archive. ## ๐Ÿš€ CLI Tool Usage diff --git a/cli/README.ko.md b/cli/README.ko.md index c5f4800b..aaa24dc7 100644 --- a/cli/README.ko.md +++ b/cli/README.ko.md @@ -168,7 +168,7 @@ patch๋Š” ๋Œ€์ฒดํ•˜๋ ค๋Š” archive๋ณด๋‹ค ์ž‘์„ ๋•Œ๋งŒ ๋ฐฐํฌํ•  ๊ฐ€์น˜๊ฐ€ ์žˆ์Šต #### base ๋ฒˆ๋“ค ๊ฒ€์ฆ `--binary-bundle-path`๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๋Š” ๋ฒˆ๋“ค์€ ๋ฆด๋ฆฌ์Šค๊ฐ€ ์Šค์Šค๋กœ ๊ฒ€์ฆํ•  ์ˆ˜ ์—†๋Š” ์œ ์ผํ•œ ์ž…๋ ฅ์ด๋ฏ€๋กœ, -[build ํ›…](../README.md#6-export-the-embedded-bundle-optional)์€ exportํ•˜๋Š” ๋ฒˆ๋“ค ์˜†์— +[build ํ›…](../docs/diff-updates.md#exporting-the-embedded-bundle)์€ exportํ•˜๋Š” ๋ฒˆ๋“ค ์˜†์— `binary-patch-base.json` ๊ธฐ๋ก์„ ํ•จ๊ป˜ ๋‚จ๊น๋‹ˆ๋‹ค. ์ด ๊ธฐ๋ก์ด ์žˆ์œผ๋ฉด base ๋ฒˆ๋“ค์˜ ์‹ค์ œ SHA-256์ด ๊ธฐ๋ก๊ณผ ๋‹ค๋ฅด๊ฑฐ๋‚˜ `--binary-version`์ด ์•„๋‹Œ ๋‹ค๋ฅธ ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฒ„์ „์—์„œ export๋œ ๋ฒˆ๋“ค์ผ ๋•Œ, ๋นŒ๋“œ๋‚˜ ์—…๋กœ๋“œ๋ฅผ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ๋ฆด๋ฆฌ์Šค๋ฅผ ์‹คํŒจ์‹œํ‚ต๋‹ˆ๋‹ค. ๊ธฐ๋ก์ด ์—†๋Š” base ๋ฒˆ๋“ค์€ ๊ธฐ์กด๊ณผ ๋™์ผํ•˜๊ฒŒ diff --git a/cli/README.md b/cli/README.md index 38de1ecb..d95ea857 100644 --- a/cli/README.md +++ b/cli/README.md @@ -170,7 +170,7 @@ anything is uploaded and leaves the release history untouched. #### Verifying the base bundle The bundle `--binary-bundle-path` points at is the one input a release cannot verify on -its own, so the [build hooks](../README.md#6-export-the-embedded-bundle-optional) leave a +its own, so the [build hooks](../docs/diff-updates.md#exporting-the-embedded-bundle) leave a `binary-patch-base.json` record next to every bundle they export. When that record is there, the release fails before anything is built or uploaded if the base bundle no longer hashes to what the record describes, or if it was exported from a binary version other diff --git a/docs/diff-updates.md b/docs/diff-updates.md new file mode 100644 index 00000000..9b3cba40 --- /dev/null +++ b/docs/diff-updates.md @@ -0,0 +1,152 @@ +# Diff Updates + +A release can offer the client the difference between the update and a bundle the client +already holds, in place of the whole thing. There are two kinds of difference, and an asset +diff is only published on a release that carries a binary patch: + +- a **binary patch**, computed against the JS bundle inside the app binary. Every client on + that binary version holds that bundle, so every one of them can use it. +- an **asset diff**, computed against a recently released update. Only a client running that + update can use it, and it carries only the assets that update does not already have, where + the binary patch carries every asset. + +A client that can use neither downloads the full archive, so a release installs either way. +All of this is optional: with none of it set up, `release` publishes the full archive alone. + +Publishing patches takes two things. Binary patches need the embedded bundle of every binary +version you release against, which is what +[Exporting the embedded bundle](#exporting-the-embedded-bundle) sets up. Asset diffs need +that plus a `bundleDownloader` in `code-push.config.ts`, covered under +[Asset diff archives](#asset-diff-archives). The patch generator itself has to be built +once before the first patch release - see +[Prerequisites: building the patch generator](../cli/README.md#prerequisites-building-the-patch-generator). + +## Exporting the embedded bundle + +A binary patch is the difference between the update and the JS bundle that is already +inside the installed app, so releasing one means holding on to that bundle: the exact +bytes the build you shipped to the store embedded. + +The library ships a hook for each platform that copies the freshly compiled bundle out of +the build, together with a `binary-patch-base.json` record describing it. + +**Android** - apply the Gradle script in your app module's `android/app/build.gradle`: + +```groovy +apply plugin: "com.android.application" +apply plugin: "com.facebook.react" + +react { + // ... +} + +apply from: "../../node_modules/@bravemobile/react-native-code-push/android/codepush-export.gradle" +``` + +The line can go anywhere in the file (if you use `ext.codePushExportDir`, set it before the +`apply from:` line). Every variant that bundles JS then exports to +`android/app/build/codepush/embedded-bundle//` after it is bundled. Pass +`-PcodePushExportDir=` (or set `ext.codePushExportDir`) to export somewhere else; the +`` directory is appended either way. + +**iOS** - call the export script at the end of the **"Bundle React Native code and images"** +build phase. In Xcode, open that phase +in your app target's **Build Phases** tab and append the last line below to its script: + +```bash +/bin/sh -c "\"$WITH_ENVIRONMENT\" \"$REACT_NATIVE_XCODE\"" + +"$SRCROOT/../node_modules/@bravemobile/react-native-code-push/scripts/export-embedded-bundle.sh" +``` + +The export lands in `$BUILD_DIR/codepush/embedded-bundle/$CONFIGURATION-$PLATFORM_NAME/`. +Set the `CODEPUSH_EXPORT_DIR` environment variable to export somewhere else; the +`$CONFIGURATION-$PLATFORM_NAME` directory is appended either way. + +> [!NOTE] +> Applying these hooks automatically through the Expo config plugin (`app.plugin.js`) is +> not implemented yet. + +### Archiving the export per binary release + +Whatever pipeline builds your store binary should keep that build's export somewhere +durable, organized by binary version, so a later release can fetch the bundle that matches +the binary it targets: + +```bash +# Android, after ./gradlew :app:assembleRelease +aws s3 cp --recursive \ + android/app/build/codepush/embedded-bundle/release \ + "s3://your-bucket/binaries/android/$BINARY_VERSION/" + +# iOS - point the export at a path the pipeline knows, since $BUILD_DIR only exists inside the build +export CODEPUSH_EXPORT_DIR="$PWD/codepush-export" +xcodebuild -workspace ios/YourApp.xcworkspace -scheme YourApp -configuration Release archive # ... +aws s3 cp --recursive \ + "$CODEPUSH_EXPORT_DIR/Release-iphoneos" \ + "s3://your-bucket/binaries/ios/$BINARY_VERSION/" +``` + +To release a patch later, download the export and pass the bundle's path to +`--binary-bundle-path`: + +```bash +aws s3 cp --recursive "s3://your-bucket/binaries/android/1.0.0/" ./binary/ +npx code-push release -b 1.0.0 -v 1.0.1 -p android \ + --binary-bundle-path ./binary/index.android.bundle +``` + +`release` also uses the record to verify the base bundle it was handed - see +[Verifying the base bundle](../cli/README.md#verifying-the-base-bundle) for details. + +## Asset diff archives + +A release published with a binary patch can carry **asset diff archives** as well - one per +recently released version. A diff archive holds the patch of the JS bundle, only the assets +that version does not already have, and a manifest of the files it has to drop. The client +copies the update it already has installed, applies those, and ends up holding exactly the +contents of the full archive. + +A client tries the archives in this order and stops at the first one it can install: + +| Order | Archive | Available when | +|---|---|---| +| 1 | Asset diff | the release was diffed against the update the client is running. | +| 2 | Binary patch | always. It is built against the bundle in the app binary, which every client has. | +| 3 | Full | always. It needs nothing installed. | + +There are two exceptions to this order. + +**Not every client tries all three.** One with no asset diff to use - it is running the +bundle in the app binary, or an update this release was not diffed against - starts at the +binary patch. + +**A failed asset diff does not always reach the binary patch.** It moves on to that archive +only when the diff failed on its asset side: the merge with the installed update failing +(`asset_merge_failed`), or the merged contents failing the package hash +(`package_verification_failed`). Anything else the diff fails on lives in the bundle patch +both archives carry, so the binary patch would fail there the same way and the client goes +straight to the full archive. + +`onUpdateArchiveResult` reports every archive that was tried - see +[Telemetry callbacks](telemetry-callbacks.md#what-onupdatearchiveresult-reports). + +### Enabling them + +Diff archives are published only when all three of these hold: + +- the release is a binary patch release (`release --binary-bundle-path`), +- `code-push.config.ts` implements `bundleDownloader`, so the CLI can fetch the earlier releases to diff against, +- `--diff-base-count` is greater than `0` (it defaults to `3`). + +```ts +bundleDownloader: async (archive, platform, identifier = 'staging') => { + const downloadedFilePath = path.join(os.tmpdir(), archive.packageHash); + const storageKey = `bundles/${platform}/${identifier}/full-bundle/${archive.packageHash}`; + // fetch storageKey from your storage (S3, Supabase, ...) to downloadedFilePath + return { downloadedFilePath }; +}, +``` + +See [Asset diff archives](../cli/README.md#asset-diff-archives) for what the release +publishes. diff --git a/docs/telemetry-callbacks.ko.md b/docs/telemetry-callbacks.ko.md index f469af3b..60214e05 100644 --- a/docs/telemetry-callbacks.ko.md +++ b/docs/telemetry-callbacks.ko.md @@ -52,7 +52,7 @@ CodePush.sync({ ## `onUpdateArchiveResult`๊ฐ€ ๋ณด๊ณ ํ•˜๋Š” ๋‚ด์šฉ -binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” full ์•„์นด์ด๋ธŒ ๋Œ€์‹  ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋Š” patch ์•„์นด์ด๋ธŒ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์•„์นด์ด๋ธŒ์˜ ์ข…๋ฅ˜์™€ ๋ฆด๋ฆฌ์Šค์— ํฌํ•จ๋˜๋Š” ์กฐ๊ฑด์€ [Asset Diff Archives](../README.md#4-2-asset-diff-archives)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. ์ด ์ฝœ๋ฐฑ์€ ์—…๋ฐ์ดํŠธ๋ฅผ ์–ด๋–ค ์•„์นด์ด๋ธŒ์—์„œ ๋‹ค์šด๋กœ๋“œํ–ˆ๋Š”์ง€์™€, ์—…๋ฐ์ดํŠธ์— ์“ฐ์ด์ง€ ๋ชปํ•œ ๋‚˜๋จธ์ง€ ์•„์นด์ด๋ธŒ์— ์–ด๋–ค ์ผ์ด ์žˆ์—ˆ๋Š”์ง€๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. +binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” full ์•„์นด์ด๋ธŒ ๋Œ€์‹  ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋Š” patch ์•„์นด์ด๋ธŒ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์•„์นด์ด๋ธŒ์˜ ์ข…๋ฅ˜์™€ ๋ฆด๋ฆฌ์Šค์— ํฌํ•จ๋˜๋Š” ์กฐ๊ฑด์€ [Asset diff archives](diff-updates.md#asset-diff-archives)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. ์ด ์ฝœ๋ฐฑ์€ ์—…๋ฐ์ดํŠธ๋ฅผ ์–ด๋–ค ์•„์นด์ด๋ธŒ์—์„œ ๋‹ค์šด๋กœ๋“œํ–ˆ๋Š”์ง€์™€, ์—…๋ฐ์ดํŠธ์— ์“ฐ์ด์ง€ ๋ชปํ•œ ๋‚˜๋จธ์ง€ ์•„์นด์ด๋ธŒ์— ์–ด๋–ค ์ผ์ด ์žˆ์—ˆ๋Š”์ง€๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. ### `UpdateArchiveResult` diff --git a/docs/telemetry-callbacks.md b/docs/telemetry-callbacks.md index d112eded..34bc4e22 100644 --- a/docs/telemetry-callbacks.md +++ b/docs/telemetry-callbacks.md @@ -65,7 +65,7 @@ CodePush.sync({ A release published with a binary patch offers the client patch archives to download in place of the full one. See -[Asset Diff Archives](../README.md#4-2-asset-diff-archives) for what those are and when a +[Asset diff archives](diff-updates.md#asset-diff-archives) for what those are and when a release carries them. This callback reports which of them the download came from, and what happened to the ones it did not. From ad26d0614c07d349d4bb0835a3406ad5a486fd04 Mon Sep 17 00:00:00 2001 From: Floyd Kim Date: Tue, 25 Aug 2026 22:28:50 +0900 Subject: [PATCH 2/3] docs: add a Korean diff update guide docs/diff-updates.ko.md carries the same sections, tables and examples as the English guide, and the two link to each other from the top. Code comments are in Korean, since the guide is read by Korean readers. The Korean CLI README and the Korean telemetry document now point at it instead of at the English guide, so a Korean reader stays in Korean. --- cli/README.ko.md | 2 +- docs/diff-updates.ko.md | 113 +++++++++++++++++++++++++++++++++ docs/diff-updates.md | 2 + docs/telemetry-callbacks.ko.md | 2 +- 4 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 docs/diff-updates.ko.md diff --git a/cli/README.ko.md b/cli/README.ko.md index aaa24dc7..3f8fa2c6 100644 --- a/cli/README.ko.md +++ b/cli/README.ko.md @@ -168,7 +168,7 @@ patch๋Š” ๋Œ€์ฒดํ•˜๋ ค๋Š” archive๋ณด๋‹ค ์ž‘์„ ๋•Œ๋งŒ ๋ฐฐํฌํ•  ๊ฐ€์น˜๊ฐ€ ์žˆ์Šต #### base ๋ฒˆ๋“ค ๊ฒ€์ฆ `--binary-bundle-path`๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๋Š” ๋ฒˆ๋“ค์€ ๋ฆด๋ฆฌ์Šค๊ฐ€ ์Šค์Šค๋กœ ๊ฒ€์ฆํ•  ์ˆ˜ ์—†๋Š” ์œ ์ผํ•œ ์ž…๋ ฅ์ด๋ฏ€๋กœ, -[build ํ›…](../docs/diff-updates.md#exporting-the-embedded-bundle)์€ exportํ•˜๋Š” ๋ฒˆ๋“ค ์˜†์— +[build ํ›…](../docs/diff-updates.ko.md#๋‚ด์žฅ-๋ฒˆ๋“ค-exportํ•˜๊ธฐ)์€ exportํ•˜๋Š” ๋ฒˆ๋“ค ์˜†์— `binary-patch-base.json` ๊ธฐ๋ก์„ ํ•จ๊ป˜ ๋‚จ๊น๋‹ˆ๋‹ค. ์ด ๊ธฐ๋ก์ด ์žˆ์œผ๋ฉด base ๋ฒˆ๋“ค์˜ ์‹ค์ œ SHA-256์ด ๊ธฐ๋ก๊ณผ ๋‹ค๋ฅด๊ฑฐ๋‚˜ `--binary-version`์ด ์•„๋‹Œ ๋‹ค๋ฅธ ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฒ„์ „์—์„œ export๋œ ๋ฒˆ๋“ค์ผ ๋•Œ, ๋นŒ๋“œ๋‚˜ ์—…๋กœ๋“œ๋ฅผ ์‹œ์ž‘ํ•˜๊ธฐ ์ „์— ๋ฆด๋ฆฌ์Šค๋ฅผ ์‹คํŒจ์‹œํ‚ต๋‹ˆ๋‹ค. ๊ธฐ๋ก์ด ์—†๋Š” base ๋ฒˆ๋“ค์€ ๊ธฐ์กด๊ณผ ๋™์ผํ•˜๊ฒŒ diff --git a/docs/diff-updates.ko.md b/docs/diff-updates.ko.md new file mode 100644 index 00000000..c6d5e1c1 --- /dev/null +++ b/docs/diff-updates.ko.md @@ -0,0 +1,113 @@ +# Diff ์—…๋ฐ์ดํŠธ + +[English](diff-updates.md) + +๋ฆด๋ฆฌ์Šค๋Š” ์—…๋ฐ์ดํŠธ ์ „์ฒด๋ฅผ ๋‚ด๋ ค์ฃผ๋Š” ๋Œ€์‹ , ์—…๋ฐ์ดํŠธ์™€ ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์ด๋ฏธ ๊ฐ€์ง„ ๋ฒˆ๋“ค ์‚ฌ์ด์˜ ์ฐจ์ด๋งŒ ์ œ๊ณตํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฐจ์ด๋Š” ๋‘ ์ข…๋ฅ˜์ด๊ณ , asset diff๋Š” binary patch๋ฅผ ๋‹ด์€ ๋ฆด๋ฆฌ์Šค์—์„œ๋งŒ ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค. + +- **binary patch**๋Š” ์Šคํ† ์–ด์— ์˜ฌ๋ฆฐ ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ๊ฐ€ ๋‚ด์žฅํ•œ JS ๋ฒˆ๋“ค์„ ๊ธฐ์ค€์œผ๋กœ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค. ๊ฐ™์€ ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฒ„์ „์„ ์„ค์น˜ํ•œ ๊ธฐ๊ธฐ๋Š” ๋‚ด์žฅ ๋ฒˆ๋“ค์ด ๋ชจ๋‘ ๋™์ผํ•˜๋ฏ€๋กœ, ๊ทธ ๋ฒ„์ „์„ ์“ฐ๋Š” ํด๋ผ์ด์–ธํŠธ๋Š” ์ „๋ถ€ binary patch๋ฅผ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. +- **asset diff**๋Š” ์ตœ๊ทผ์— ๋ฐฐํฌํ•œ OTA ์—…๋ฐ์ดํŠธ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์ค€์ด ๋œ ์—…๋ฐ์ดํŠธ๋ฅผ ์‹คํ–‰ ์ค‘์ธ ํด๋ผ์ด์–ธํŠธ๋งŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. binary patch๊ฐ€ ๋ชจ๋“  asset์„ ๋‹ด๋Š” ๊ฒƒ๊ณผ ๋‹ฌ๋ฆฌ, ๊ธฐ์ค€ ์—…๋ฐ์ดํŠธ์— ์—†๋Š” asset๋งŒ ๋‹ด์Šต๋‹ˆ๋‹ค. + +๋‘˜ ๋‹ค ์“ธ ์ˆ˜ ์—†๋Š” ํด๋ผ์ด์–ธํŠธ๋Š” full ์•„์นด์ด๋ธŒ๋ฅผ ๋‚ด๋ ค๋ฐ›์œผ๋ฏ€๋กœ ์–ด๋А ๊ฒฝ์šฐ์—๋„ ๋ฆด๋ฆฌ์Šค๋Š” ์„ค์น˜๋ฉ๋‹ˆ๋‹ค. ์ด ๊ธฐ๋Šฅ์€ ์ „๋ถ€ ์„ ํƒ ์‚ฌํ•ญ์ž…๋‹ˆ๋‹ค. ์•„๋ฌด๊ฒƒ๋„ ์„ค์ •ํ•˜์ง€ ์•Š์œผ๋ฉด `release`๋Š” full ์•„์นด์ด๋ธŒ๋งŒ ๋ฐฐํฌํ•ฉ๋‹ˆ๋‹ค. + +patch๋ฅผ ๋ฐฐํฌํ•˜๋ ค๋ฉด ๋‘ ๊ฐ€์ง€๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. binary patch์—๋Š” ๊ธฐ์ค€์œผ๋กœ ์‚ผ๋Š” ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฒ„์ „๋งˆ๋‹ค ๋‚ด์žฅ ๋ฒˆ๋“ค์ด ์žˆ์–ด์•ผ ํ•˜๊ณ , ์ด ์ค€๋น„๋Š” [๋‚ด์žฅ ๋ฒˆ๋“ค exportํ•˜๊ธฐ](#๋‚ด์žฅ-๋ฒˆ๋“ค-exportํ•˜๊ธฐ)์—์„œ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค. asset diff์—๋Š” ๊ทธ์— ๋”ํ•ด `code-push.config.ts`์˜ `bundleDownloader`๊ฐ€ ํ•„์š”ํ•˜๋ฉฐ [asset diff ์•„์นด์ด๋ธŒ](#asset-diff-์•„์นด์ด๋ธŒ)์—์„œ ๋‹ค๋ฃน๋‹ˆ๋‹ค. patch ์ƒ์„ฑ ๋„๊ตฌ ์ž์ฒด๋Š” ์ฒซ patch ๋ฆด๋ฆฌ์Šค ์ „์— ํ•œ ๋ฒˆ ๋นŒ๋“œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. [์‚ฌ์ „ ์ค€๋น„: patch ์ƒ์„ฑ ๋„๊ตฌ ๋นŒ๋“œ](../cli/README.ko.md#์‚ฌ์ „-์ค€๋น„-patch-์ƒ์„ฑ-๋„๊ตฌ-๋นŒ๋“œ)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. + +## ๋‚ด์žฅ ๋ฒˆ๋“ค exportํ•˜๊ธฐ + +binary patch๋Š” ์—…๋ฐ์ดํŠธ์™€ ์„ค์น˜๋œ ์•ฑ ์•ˆ์— ์ด๋ฏธ ๋“ค์–ด ์žˆ๋Š” JS ๋ฒˆ๋“ค์˜ ์ฐจ์ด์ž…๋‹ˆ๋‹ค. patch๋ฅผ ๋ฐฐํฌํ•œ๋‹ค๋Š” ๊ฒƒ์€ ๊ทธ ๋ฒˆ๋“ค, ์ฆ‰ ์Šคํ† ์–ด์— ์˜ฌ๋ฆฐ ๋นŒ๋“œ๊ฐ€ ๋‚ด์žฅํ•œ ๋ฐ”์ดํŠธ๋ฅผ ๊ทธ๋Œ€๋กœ ๋ณด๊ด€ํ•ด ๋‘”๋‹ค๋Š” ๋œป์ž…๋‹ˆ๋‹ค. + +๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ํ”Œ๋žซํผ๋งˆ๋‹ค ํ›…์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ด ํ›…์€ ๋ฐฉ๊ธˆ ์ปดํŒŒ์ผ๋œ ๋ฒˆ๋“ค์„ ๋นŒ๋“œ์—์„œ ๋ณต์‚ฌํ•ด ๋‚ด๋ณด๋‚ด๊ณ , ๊ทธ ๋ฒˆ๋“ค์„ ์„ค๋ช…ํ•˜๋Š” `binary-patch-base.json` ๊ธฐ๋ก์„ ํ•จ๊ป˜ ๋‚จ๊น๋‹ˆ๋‹ค. + +**Android** - ์•ฑ ๋ชจ๋“ˆ์˜ `android/app/build.gradle`์— Gradle ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค. + +```groovy +apply plugin: "com.android.application" +apply plugin: "com.facebook.react" + +react { + // ... +} + +apply from: "../../node_modules/@bravemobile/react-native-code-push/android/codepush-export.gradle" +``` + +์ด ์ค„์€ ํŒŒ์ผ ์•ˆ ์–ด๋””์— ๋‘์–ด๋„ ๋ฉ๋‹ˆ๋‹ค. `ext.codePushExportDir`๋ฅผ ์“ด๋‹ค๋ฉด `apply from:` ์ค„๋ณด๋‹ค ์•ž์—์„œ ์„ค์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด JS๋ฅผ ๋ฒˆ๋“ค๋งํ•˜๋Š” variant๋งˆ๋‹ค ๋ฒˆ๋“ค๋ง์„ ๋งˆ์นœ ๋’ค `android/app/build/codepush/embedded-bundle//`๋กœ exportํ•ฉ๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ์œ„์น˜๋กœ ๋‚ด๋ณด๋‚ด๋ ค๋ฉด `-PcodePushExportDir=`๋ฅผ ์ „๋‹ฌํ•˜๊ฑฐ๋‚˜ `ext.codePushExportDir`๋ฅผ ์„ค์ •ํ•˜์„ธ์š”. ์–ด๋А ์ชฝ์ด๋“  `` ๋””๋ ‰ํ„ฐ๋ฆฌ๊ฐ€ ๋’ค์— ๋ถ™์Šต๋‹ˆ๋‹ค. + +**iOS** - **"Bundle React Native code and images"** build phase์˜ ๋งˆ์ง€๋ง‰์—์„œ export ์Šคํฌ๋ฆฝํŠธ๋ฅผ ํ˜ธ์ถœํ•ฉ๋‹ˆ๋‹ค. Xcode์—์„œ ์•ฑ ํƒ€๊นƒ์˜ **Build Phases** ํƒญ์„ ์—ด์–ด ๊ทธ phase๋ฅผ ์ฐพ๊ณ , ์Šคํฌ๋ฆฝํŠธ ๋์— ์•„๋ž˜ ๋งˆ์ง€๋ง‰ ์ค„์„ ๋ง๋ถ™์ž…๋‹ˆ๋‹ค. + +```bash +/bin/sh -c "\"$WITH_ENVIRONMENT\" \"$REACT_NATIVE_XCODE\"" + +"$SRCROOT/../node_modules/@bravemobile/react-native-code-push/scripts/export-embedded-bundle.sh" +``` + +export ๊ฒฐ๊ณผ๋Š” `$BUILD_DIR/codepush/embedded-bundle/$CONFIGURATION-$PLATFORM_NAME/`์— ์ƒ๊น๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ์œ„์น˜๋กœ ๋‚ด๋ณด๋‚ด๋ ค๋ฉด `CODEPUSH_EXPORT_DIR` ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•˜์„ธ์š”. ์–ด๋А ์ชฝ์ด๋“  `$CONFIGURATION-$PLATFORM_NAME` ๋””๋ ‰ํ„ฐ๋ฆฌ๊ฐ€ ๋’ค์— ๋ถ™์Šต๋‹ˆ๋‹ค. + +> [!NOTE] +> Expo config plugin(`app.plugin.js`)์œผ๋กœ ์ด ํ›…์„ ์ž๋™ ์ ์šฉํ•˜๋Š” ๊ธฐ๋Šฅ์€ ์•„์ง ๊ตฌํ˜„๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. + +### ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฆด๋ฆฌ์Šค๋ณ„๋กœ export ๋ณด๊ด€ํ•˜๊ธฐ + +์Šคํ† ์–ด ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋นŒ๋“œํ•˜๋Š” ํŒŒ์ดํ”„๋ผ์ธ์€ ๊ทธ ๋นŒ๋“œ์˜ export๋ฅผ ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฒ„์ „๋ณ„๋กœ ์ •๋ฆฌํ•ด ์˜ค๋ž˜ ๋‚จ๋Š” ๊ณณ์— ๋ณด๊ด€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ดํ›„ ๋ฆด๋ฆฌ์Šค๊ฐ€ ๋Œ€์ƒ ๋ฐ”์ด๋„ˆ๋ฆฌ์— ๋งž๋Š” ๋ฒˆ๋“ค์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. + +```bash +# Android, ./gradlew :app:assembleRelease ์‹คํ–‰ ํ›„ +aws s3 cp --recursive \ + android/app/build/codepush/embedded-bundle/release \ + "s3://your-bucket/binaries/android/$BINARY_VERSION/" + +# iOS - $BUILD_DIR๋Š” ๋นŒ๋“œ ์•ˆ์—์„œ๋งŒ ์กด์žฌํ•˜๋ฏ€๋กœ, ํŒŒ์ดํ”„๋ผ์ธ์ด ์•„๋Š” ๊ฒฝ๋กœ๋กœ export ์œ„์น˜๋ฅผ ์ง€์ •ํ•œ๋‹ค +export CODEPUSH_EXPORT_DIR="$PWD/codepush-export" +xcodebuild -workspace ios/YourApp.xcworkspace -scheme YourApp -configuration Release archive # ... +aws s3 cp --recursive \ + "$CODEPUSH_EXPORT_DIR/Release-iphoneos" \ + "s3://your-bucket/binaries/ios/$BINARY_VERSION/" +``` + +์ดํ›„ patch๋ฅผ ๋ฐฐํฌํ•  ๋•Œ๋Š” ๋ณด๊ด€ํ•ด ๋‘” export๋ฅผ ๋‚ด๋ ค๋ฐ›์•„ ๋ฒˆ๋“ค ๊ฒฝ๋กœ๋ฅผ `--binary-bundle-path`์— ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค. + +```bash +aws s3 cp --recursive "s3://your-bucket/binaries/android/1.0.0/" ./binary/ +npx code-push release -b 1.0.0 -v 1.0.1 -p android \ + --binary-bundle-path ./binary/index.android.bundle +``` + +`release`๋Š” ์ด ๊ธฐ๋ก์œผ๋กœ ์ „๋‹ฌ๋ฐ›์€ base ๋ฒˆ๋“ค์ด ๋งž๋Š”์ง€ ๊ฒ€์ฆํ•˜๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ [base ๋ฒˆ๋“ค ๊ฒ€์ฆ](../cli/README.ko.md#base-๋ฒˆ๋“ค-๊ฒ€์ฆ)์„ ์ฐธ๊ณ ํ•˜์„ธ์š”. + +## asset diff ์•„์นด์ด๋ธŒ + +binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” **asset diff ์•„์นด์ด๋ธŒ**๋„ ํ•จ๊ป˜ ๋‹ด์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ตœ๊ทผ์— ๋ฐฐํฌํ•œ ๋ฒ„์ „๋งˆ๋‹ค ํ•˜๋‚˜์”ฉ์ž…๋‹ˆ๋‹ค. diff ์•„์นด์ด๋ธŒ๋Š” JS ๋ฒˆ๋“ค์˜ patch, ๊ทธ ๋ฒ„์ „์— ์•„์ง ์—†๋Š” asset, ์‚ญ์ œํ•ด์•ผ ํ•˜๋Š” ํŒŒ์ผ ๋ชฉ๋ก manifest๋งŒ ๋‹ด์Šต๋‹ˆ๋‹ค. ํด๋ผ์ด์–ธํŠธ๋Š” ์ด๋ฏธ ์„ค์น˜ํ•œ ์—…๋ฐ์ดํŠธ๋ฅผ ๋ณต์‚ฌํ•œ ๋’ค ์ด๊ฒƒ๋“ค์„ ์ ์šฉํ•˜๊ณ , ๊ฒฐ๊ณผ์ ์œผ๋กœ full ์•„์นด์ด๋ธŒ์™€ ๋˜‘๊ฐ™์€ ๋‚ด์šฉ์„ ๊ฐ–๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. + +ํด๋ผ์ด์–ธํŠธ๋Š” ์•„๋ž˜ ์ˆœ์„œ๋กœ ์•„์นด์ด๋ธŒ๋ฅผ ์‹œ๋„ํ•˜๊ณ , ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋Š” ์ฒซ ๋ฒˆ์งธ ์•„์นด์ด๋ธŒ์—์„œ ๋ฉˆ์ถฅ๋‹ˆ๋‹ค. + +| ์ˆœ์„œ | ์•„์นด์ด๋ธŒ | ์‚ฌ์šฉ ์กฐ๊ฑด | +|---|---|---| +| 1 | asset diff | ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์‹คํ–‰ ์ค‘์ธ ์—…๋ฐ์ดํŠธ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฆด๋ฆฌ์Šค๊ฐ€ diff๋ฅผ ๋งŒ๋“ค์–ด ๋‘” ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. | +| 2 | binary patch | ํ•ญ์ƒ ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๊ฐ€์ง„ ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ์˜ ๋ฒˆ๋“ค์„ ๊ธฐ์ค€์œผ๋กœ ๋งŒ๋“ค๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. | +| 3 | full | ํ•ญ์ƒ ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์„ค์น˜๋œ ๊ฒƒ์ด ์—†์–ด๋„ ๋ฉ๋‹ˆ๋‹ค. | + +์ด ์ˆœ์„œ์—๋Š” ์˜ˆ์™ธ๊ฐ€ ๋‘ ๊ฐ€์ง€ ์žˆ์Šต๋‹ˆ๋‹ค. + +**๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์…‹์„ ๋‹ค ์‹œ๋„ํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.** ์“ธ ์ˆ˜ ์žˆ๋Š” asset diff๊ฐ€ ์—†๋Š” ํด๋ผ์ด์–ธํŠธ๋Š” binary patch์—์„œ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ์˜ ๋ฒˆ๋“ค์„ ์‹คํ–‰ ์ค‘์ด๊ฑฐ๋‚˜, ์ด ๋ฆด๋ฆฌ์Šค๊ฐ€ diff๋ฅผ ๋งŒ๋“ค์ง€ ์•Š์€ ์—…๋ฐ์ดํŠธ๋ฅผ ์‹คํ–‰ ์ค‘์ธ ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. + +**asset diff๊ฐ€ ์‹คํŒจํ•ด๋„ ํ•ญ์ƒ binary patch๋กœ ๋„˜์–ด๊ฐ€์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.** diff๊ฐ€ asset ์˜์—ญ์—์„œ ์‹คํŒจํ–ˆ์„ ๋•Œ๋งŒ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค. ์„ค์น˜๋œ ์—…๋ฐ์ดํŠธ์™€ ๋ณ‘ํ•ฉํ•˜์ง€ ๋ชปํ–ˆ๊ฑฐ๋‚˜(`asset_merge_failed`), ๋ณ‘ํ•ฉ๋œ ๋‚ด์šฉ์ด package hash ๊ฒ€์ฆ์— ์‹คํŒจํ•œ ๊ฒฝ์šฐ(`package_verification_failed`)์ž…๋‹ˆ๋‹ค. ๊ทธ ๋ฐ–์˜ ์‹คํŒจ๋Š” ๋‘ ์•„์นด์ด๋ธŒ๊ฐ€ ๊ณต์œ ํ•˜๋Š” bundle patch์—์„œ ์ผ์–ด๋‚˜๋ฏ€๋กœ binary patch๋„ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ์‹คํŒจํ•ฉ๋‹ˆ๋‹ค. ์ด๋•Œ ํด๋ผ์ด์–ธํŠธ๋Š” ๊ณง๋ฐ”๋กœ full ์•„์นด์ด๋ธŒ๋ฅผ ๋‚ด๋ ค๋ฐ›์Šต๋‹ˆ๋‹ค. + +`onUpdateArchiveResult`๋Š” ์‹œ๋„ํ•œ ์•„์นด์ด๋ธŒ๋ฅผ ๋ชจ๋‘ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. [ํ…”๋ ˆ๋ฉ”ํŠธ๋ฆฌ ์ฝœ๋ฐฑ](telemetry-callbacks.ko.md#onupdatearchiveresult๊ฐ€-๋ณด๊ณ ํ•˜๋Š”-๋‚ด์šฉ)์„ ์ฐธ๊ณ ํ•˜์„ธ์š”. + +### ๋ฐฐํฌ ์กฐ๊ฑด + +diff ์•„์นด์ด๋ธŒ๋Š” ์•„๋ž˜ ์„ธ ์กฐ๊ฑด์ด ๋ชจ๋‘ ์„ฑ๋ฆฝํ•  ๋•Œ๋งŒ ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค. + +- binary patch ๋ฆด๋ฆฌ์Šค์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค(`release --binary-bundle-path`). +- `code-push.config.ts`๊ฐ€ `bundleDownloader`๋ฅผ ๊ตฌํ˜„ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. CLI๊ฐ€ diff์˜ ๊ธฐ์ค€์ด ๋  ์ด์ „ ๋ฆด๋ฆฌ์Šค๋ฅผ ๋‚ด๋ ค๋ฐ›๋Š” ๋ฐ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. +- `--diff-base-count`๊ฐ€ `0`๋ณด๋‹ค ์ปค์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ๊ฐ’์€ `3`์ž…๋‹ˆ๋‹ค. + +```ts +bundleDownloader: async (archive, platform, identifier = 'staging') => { + const downloadedFilePath = path.join(os.tmpdir(), archive.packageHash); + const storageKey = `bundles/${platform}/${identifier}/full-bundle/${archive.packageHash}`; + // storageKey๋ฅผ ์Šคํ† ๋ฆฌ์ง€(S3, Supabase, ...)์—์„œ downloadedFilePath๋กœ ๋‚ด๋ ค๋ฐ›๋Š”๋‹ค + return { downloadedFilePath }; +}, +``` + +๋ฆด๋ฆฌ์Šค๊ฐ€ ์‹ค์ œ๋กœ ๋ฌด์—‡์„ ๋ฐฐํฌํ•˜๋Š”์ง€๋Š” [asset diff archive](../cli/README.ko.md#asset-diff-archive)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. diff --git a/docs/diff-updates.md b/docs/diff-updates.md index 9b3cba40..40aeba02 100644 --- a/docs/diff-updates.md +++ b/docs/diff-updates.md @@ -1,5 +1,7 @@ # Diff Updates +[ํ•œ๊ตญ์–ด](diff-updates.ko.md) + A release can offer the client the difference between the update and a bundle the client already holds, in place of the whole thing. There are two kinds of difference, and an asset diff is only published on a release that carries a binary patch: diff --git a/docs/telemetry-callbacks.ko.md b/docs/telemetry-callbacks.ko.md index 60214e05..b175d09e 100644 --- a/docs/telemetry-callbacks.ko.md +++ b/docs/telemetry-callbacks.ko.md @@ -52,7 +52,7 @@ CodePush.sync({ ## `onUpdateArchiveResult`๊ฐ€ ๋ณด๊ณ ํ•˜๋Š” ๋‚ด์šฉ -binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” full ์•„์นด์ด๋ธŒ ๋Œ€์‹  ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋Š” patch ์•„์นด์ด๋ธŒ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์•„์นด์ด๋ธŒ์˜ ์ข…๋ฅ˜์™€ ๋ฆด๋ฆฌ์Šค์— ํฌํ•จ๋˜๋Š” ์กฐ๊ฑด์€ [Asset diff archives](diff-updates.md#asset-diff-archives)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. ์ด ์ฝœ๋ฐฑ์€ ์—…๋ฐ์ดํŠธ๋ฅผ ์–ด๋–ค ์•„์นด์ด๋ธŒ์—์„œ ๋‹ค์šด๋กœ๋“œํ–ˆ๋Š”์ง€์™€, ์—…๋ฐ์ดํŠธ์— ์“ฐ์ด์ง€ ๋ชปํ•œ ๋‚˜๋จธ์ง€ ์•„์นด์ด๋ธŒ์— ์–ด๋–ค ์ผ์ด ์žˆ์—ˆ๋Š”์ง€๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. +binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” full ์•„์นด์ด๋ธŒ ๋Œ€์‹  ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋Š” patch ์•„์นด์ด๋ธŒ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์•„์นด์ด๋ธŒ์˜ ์ข…๋ฅ˜์™€ ๋ฆด๋ฆฌ์Šค์— ํฌํ•จ๋˜๋Š” ์กฐ๊ฑด์€ [asset diff ์•„์นด์ด๋ธŒ](diff-updates.ko.md#asset-diff-์•„์นด์ด๋ธŒ)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. ์ด ์ฝœ๋ฐฑ์€ ์—…๋ฐ์ดํŠธ๋ฅผ ์–ด๋–ค ์•„์นด์ด๋ธŒ์—์„œ ๋‹ค์šด๋กœ๋“œํ–ˆ๋Š”์ง€์™€, ์—…๋ฐ์ดํŠธ์— ์“ฐ์ด์ง€ ๋ชปํ•œ ๋‚˜๋จธ์ง€ ์•„์นด์ด๋ธŒ์— ์–ด๋–ค ์ผ์ด ์žˆ์—ˆ๋Š”์ง€๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. ### `UpdateArchiveResult` From ff44b1a4d73b0dc3de888ad68398eae4d2611067 Mon Sep 17 00:00:00 2001 From: Floyd Kim Date: Tue, 25 Aug 2026 22:32:14 +0900 Subject: [PATCH 3/3] docs: name what the vague references were pointing at Several sentences leaned on a demonstrative whose antecedent sat dozens of lines away, in a different table row, or nowhere in the sentence at all: "the record" for a binary-patch-base.json named 56 lines earlier, "that download" for the row above it, a plural pronoun for a pair of nouns. Each one now names the thing. Five in the Korean diff update guide, two in the Korean telemetry document, and the two that read the same way in the English originals. --- docs/diff-updates.ko.md | 10 +++++----- docs/diff-updates.md | 5 +++-- docs/telemetry-callbacks.ko.md | 4 ++-- docs/telemetry-callbacks.md | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/diff-updates.ko.md b/docs/diff-updates.ko.md index c6d5e1c1..6feadd2f 100644 --- a/docs/diff-updates.ko.md +++ b/docs/diff-updates.ko.md @@ -47,7 +47,7 @@ export ๊ฒฐ๊ณผ๋Š” `$BUILD_DIR/codepush/embedded-bundle/$CONFIGURATION-$PLATFORM_N ### ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฆด๋ฆฌ์Šค๋ณ„๋กœ export ๋ณด๊ด€ํ•˜๊ธฐ -์Šคํ† ์–ด ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋นŒ๋“œํ•˜๋Š” ํŒŒ์ดํ”„๋ผ์ธ์€ ๊ทธ ๋นŒ๋“œ์˜ export๋ฅผ ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฒ„์ „๋ณ„๋กœ ์ •๋ฆฌํ•ด ์˜ค๋ž˜ ๋‚จ๋Š” ๊ณณ์— ๋ณด๊ด€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ดํ›„ ๋ฆด๋ฆฌ์Šค๊ฐ€ ๋Œ€์ƒ ๋ฐ”์ด๋„ˆ๋ฆฌ์— ๋งž๋Š” ๋ฒˆ๋“ค์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. +์Šคํ† ์–ด ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋นŒ๋“œํ•˜๋Š” ํŒŒ์ดํ”„๋ผ์ธ์€ ๋นŒ๋“œ๋งˆ๋‹ค ๋‚˜์˜จ export๋ฅผ ๋ฐ”์ด๋„ˆ๋ฆฌ ๋ฒ„์ „๋ณ„๋กœ ์ •๋ฆฌํ•ด ์˜ค๋ž˜ ๋‚จ๋Š” ๊ณณ์— ๋ณด๊ด€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ดํ›„ ๋ฆด๋ฆฌ์Šค๊ฐ€ ๋Œ€์ƒ ๋ฐ”์ด๋„ˆ๋ฆฌ์— ๋งž๋Š” ๋ฒˆ๋“ค์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ```bash # Android, ./gradlew :app:assembleRelease ์‹คํ–‰ ํ›„ @@ -71,11 +71,11 @@ npx code-push release -b 1.0.0 -v 1.0.1 -p android \ --binary-bundle-path ./binary/index.android.bundle ``` -`release`๋Š” ์ด ๊ธฐ๋ก์œผ๋กœ ์ „๋‹ฌ๋ฐ›์€ base ๋ฒˆ๋“ค์ด ๋งž๋Š”์ง€ ๊ฒ€์ฆํ•˜๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ [base ๋ฒˆ๋“ค ๊ฒ€์ฆ](../cli/README.ko.md#base-๋ฒˆ๋“ค-๊ฒ€์ฆ)์„ ์ฐธ๊ณ ํ•˜์„ธ์š”. +`release`๋Š” export์— ํ•จ๊ป˜ ๋‹ด๊ธด `binary-patch-base.json` ๊ธฐ๋ก์œผ๋กœ ์ „๋‹ฌ๋ฐ›์€ base ๋ฒˆ๋“ค์ด ๋งž๋Š”์ง€ ๊ฒ€์ฆํ•˜๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ [base ๋ฒˆ๋“ค ๊ฒ€์ฆ](../cli/README.ko.md#base-๋ฒˆ๋“ค-๊ฒ€์ฆ)์„ ์ฐธ๊ณ ํ•˜์„ธ์š”. ## asset diff ์•„์นด์ด๋ธŒ -binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” **asset diff ์•„์นด์ด๋ธŒ**๋„ ํ•จ๊ป˜ ๋‹ด์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ตœ๊ทผ์— ๋ฐฐํฌํ•œ ๋ฒ„์ „๋งˆ๋‹ค ํ•˜๋‚˜์”ฉ์ž…๋‹ˆ๋‹ค. diff ์•„์นด์ด๋ธŒ๋Š” JS ๋ฒˆ๋“ค์˜ patch, ๊ทธ ๋ฒ„์ „์— ์•„์ง ์—†๋Š” asset, ์‚ญ์ œํ•ด์•ผ ํ•˜๋Š” ํŒŒ์ผ ๋ชฉ๋ก manifest๋งŒ ๋‹ด์Šต๋‹ˆ๋‹ค. ํด๋ผ์ด์–ธํŠธ๋Š” ์ด๋ฏธ ์„ค์น˜ํ•œ ์—…๋ฐ์ดํŠธ๋ฅผ ๋ณต์‚ฌํ•œ ๋’ค ์ด๊ฒƒ๋“ค์„ ์ ์šฉํ•˜๊ณ , ๊ฒฐ๊ณผ์ ์œผ๋กœ full ์•„์นด์ด๋ธŒ์™€ ๋˜‘๊ฐ™์€ ๋‚ด์šฉ์„ ๊ฐ–๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. +binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” **asset diff ์•„์นด์ด๋ธŒ**๋„ ํ•จ๊ป˜ ๋‹ด์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ตœ๊ทผ์— ๋ฐฐํฌํ•œ ๋ฒ„์ „๋งˆ๋‹ค ํ•˜๋‚˜์”ฉ์ž…๋‹ˆ๋‹ค. diff ์•„์นด์ด๋ธŒ๋Š” JS ๋ฒˆ๋“ค์˜ patch, ๊ธฐ์ค€์ด ๋œ ๋ฒ„์ „์— ์•„์ง ์—†๋Š” asset, ์‚ญ์ œํ•ด์•ผ ํ•˜๋Š” ํŒŒ์ผ ๋ชฉ๋ก manifest๋งŒ ๋‹ด์Šต๋‹ˆ๋‹ค. ํด๋ผ์ด์–ธํŠธ๋Š” ์ด๋ฏธ ์„ค์น˜ํ•œ ๊ธฐ์ค€ ์—…๋ฐ์ดํŠธ๋ฅผ ๋ณต์‚ฌํ•œ ๋’ค patch์™€ manifest๋ฅผ ์ ์šฉํ•˜๊ณ , ๊ฒฐ๊ณผ์ ์œผ๋กœ full ์•„์นด์ด๋ธŒ์™€ ๋˜‘๊ฐ™์€ ๋‚ด์šฉ์„ ๊ฐ–๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ํด๋ผ์ด์–ธํŠธ๋Š” ์•„๋ž˜ ์ˆœ์„œ๋กœ ์•„์นด์ด๋ธŒ๋ฅผ ์‹œ๋„ํ•˜๊ณ , ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋Š” ์ฒซ ๋ฒˆ์งธ ์•„์นด์ด๋ธŒ์—์„œ ๋ฉˆ์ถฅ๋‹ˆ๋‹ค. @@ -83,11 +83,11 @@ binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” **asset diff ์•„์นด์ด๋ธŒ**๋„ ํ•จ๊ป˜ ๋‹ด |---|---|---| | 1 | asset diff | ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์‹คํ–‰ ์ค‘์ธ ์—…๋ฐ์ดํŠธ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฆด๋ฆฌ์Šค๊ฐ€ diff๋ฅผ ๋งŒ๋“ค์–ด ๋‘” ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. | | 2 | binary patch | ํ•ญ์ƒ ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๊ฐ€์ง„ ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ์˜ ๋ฒˆ๋“ค์„ ๊ธฐ์ค€์œผ๋กœ ๋งŒ๋“ค๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. | -| 3 | full | ํ•ญ์ƒ ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์„ค์น˜๋œ ๊ฒƒ์ด ์—†์–ด๋„ ๋ฉ๋‹ˆ๋‹ค. | +| 3 | full | ํ•ญ์ƒ ์“ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์„ค์น˜๋œ ์—…๋ฐ์ดํŠธ๊ฐ€ ์—†์–ด๋„ ๋ฉ๋‹ˆ๋‹ค. | ์ด ์ˆœ์„œ์—๋Š” ์˜ˆ์™ธ๊ฐ€ ๋‘ ๊ฐ€์ง€ ์žˆ์Šต๋‹ˆ๋‹ค. -**๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์…‹์„ ๋‹ค ์‹œ๋„ํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.** ์“ธ ์ˆ˜ ์žˆ๋Š” asset diff๊ฐ€ ์—†๋Š” ํด๋ผ์ด์–ธํŠธ๋Š” binary patch์—์„œ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ์˜ ๋ฒˆ๋“ค์„ ์‹คํ–‰ ์ค‘์ด๊ฑฐ๋‚˜, ์ด ๋ฆด๋ฆฌ์Šค๊ฐ€ diff๋ฅผ ๋งŒ๋“ค์ง€ ์•Š์€ ์—…๋ฐ์ดํŠธ๋ฅผ ์‹คํ–‰ ์ค‘์ธ ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. +**๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์…‹์„ ๋‹ค ์‹œ๋„ํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.** ์“ธ ์ˆ˜ ์žˆ๋Š” asset diff๊ฐ€ ์—†๋Š” ํด๋ผ์ด์–ธํŠธ๋Š” binary patch์—์„œ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ์˜ ๋ฒˆ๋“ค์„ ์‹คํ–‰ ์ค‘์ด๊ฑฐ๋‚˜, ์ƒˆ ๋ฆด๋ฆฌ์Šค๊ฐ€ diff๋ฅผ ๋งŒ๋“ค์ง€ ์•Š์€ ์—…๋ฐ์ดํŠธ๋ฅผ ์‹คํ–‰ ์ค‘์ธ ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. **asset diff๊ฐ€ ์‹คํŒจํ•ด๋„ ํ•ญ์ƒ binary patch๋กœ ๋„˜์–ด๊ฐ€์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.** diff๊ฐ€ asset ์˜์—ญ์—์„œ ์‹คํŒจํ–ˆ์„ ๋•Œ๋งŒ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค. ์„ค์น˜๋œ ์—…๋ฐ์ดํŠธ์™€ ๋ณ‘ํ•ฉํ•˜์ง€ ๋ชปํ–ˆ๊ฑฐ๋‚˜(`asset_merge_failed`), ๋ณ‘ํ•ฉ๋œ ๋‚ด์šฉ์ด package hash ๊ฒ€์ฆ์— ์‹คํŒจํ•œ ๊ฒฝ์šฐ(`package_verification_failed`)์ž…๋‹ˆ๋‹ค. ๊ทธ ๋ฐ–์˜ ์‹คํŒจ๋Š” ๋‘ ์•„์นด์ด๋ธŒ๊ฐ€ ๊ณต์œ ํ•˜๋Š” bundle patch์—์„œ ์ผ์–ด๋‚˜๋ฏ€๋กœ binary patch๋„ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ์‹คํŒจํ•ฉ๋‹ˆ๋‹ค. ์ด๋•Œ ํด๋ผ์ด์–ธํŠธ๋Š” ๊ณง๋ฐ”๋กœ full ์•„์นด์ด๋ธŒ๋ฅผ ๋‚ด๋ ค๋ฐ›์Šต๋‹ˆ๋‹ค. diff --git a/docs/diff-updates.md b/docs/diff-updates.md index 40aeba02..aa4e6ed1 100644 --- a/docs/diff-updates.md +++ b/docs/diff-updates.md @@ -98,8 +98,9 @@ npx code-push release -b 1.0.0 -v 1.0.1 -p android \ --binary-bundle-path ./binary/index.android.bundle ``` -`release` also uses the record to verify the base bundle it was handed - see -[Verifying the base bundle](../cli/README.md#verifying-the-base-bundle) for details. +`release` also uses the `binary-patch-base.json` record to verify the base bundle it was +handed - see [Verifying the base bundle](../cli/README.md#verifying-the-base-bundle) for +details. ## Asset diff archives diff --git a/docs/telemetry-callbacks.ko.md b/docs/telemetry-callbacks.ko.md index b175d09e..63ebc968 100644 --- a/docs/telemetry-callbacks.ko.md +++ b/docs/telemetry-callbacks.ko.md @@ -11,7 +11,7 @@ | ์ฝœ๋ฐฑ | ํ˜ธ์ถœ ์‹œ์  | ์ „๋‹ฌ๊ฐ’ | |---|---|---| | `onDownloadStart` | ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์—…๋ฐ์ดํŠธ์˜ ๋‹ค์šด๋กœ๋“œ๊ฐ€ ์‹œ์ž‘๋  ๋•Œ | `(label)` | -| `onDownloadSuccess` | ํ•ด๋‹น ๋‹ค์šด๋กœ๋“œ๊ฐ€ ์™„๋ฃŒ๋  ๋•Œ. ์„ค์น˜๋Š” ์ดํ›„์— ์ด๋ค„์ง€๋ฏ€๋กœ, ์—…๋ฐ์ดํŠธ๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๋œป์€ ์•„๋‹™๋‹ˆ๋‹ค. | `(label)` | +| `onDownloadSuccess` | ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์—…๋ฐ์ดํŠธ์˜ ๋‹ค์šด๋กœ๋“œ๊ฐ€ ์™„๋ฃŒ๋  ๋•Œ. ์„ค์น˜๋Š” ์ดํ›„์— ์ด๋ค„์ง€๋ฏ€๋กœ, ์—…๋ฐ์ดํŠธ๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๋œป์€ ์•„๋‹™๋‹ˆ๋‹ค. | `(label)` | | `onUpdateArchiveResult` | binary patch๋กœ ๋ฐฐํฌ๋œ ์—…๋ฐ์ดํŠธ๊ฐ€ ๋‹ค์šด๋กœ๋“œ๋œ ๋’ค, ์„ค์น˜๋˜๊ธฐ ์ „ | `(label, result)` | | `onUpdateSuccess` | ์„ฑ๊ณต ์ƒํƒœ๋ฅผ ํ™•์ •ํ•˜๋Š” [`notifyAppReady`](api-js.md#codepushnotifyappready) ํ˜ธ์ถœ์„ ๊ธฐ์ค€์œผ๋กœ, ์„ค์น˜๋œ ์—…๋ฐ์ดํŠธ๊ฐ€ ์ •์ƒ ์‹คํ–‰๋์„ ๋•Œ | `(label)` | | `onUpdateRollback` | ์„ค์น˜๋œ ์—…๋ฐ์ดํŠธ๊ฐ€ ์‹คํ–‰์— ์‹คํŒจํ•ด ์ด์ „ ๋ฒ„์ „์œผ๋กœ ๋กค๋ฐฑ๋  ๋•Œ | `(label)` | @@ -86,7 +86,7 @@ binary patch๋กœ ๋ฐฐํฌํ•œ ๋ฆด๋ฆฌ์Šค๋Š” full ์•„์นด์ด๋ธŒ ๋Œ€์‹  ๋‹ค์šด๋กœ๋“œํ•  | `base_bundle_unavailable` | ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ ์•ˆ์˜ ๋ฒˆ๋“ค์„ ์—ด๊ฑฐ๋‚˜ ์ฝ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. | | `base_hash_mismatch` | ์•ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ ์•ˆ์˜ ๋ฒˆ๋“ค์ด patch๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ๊ธฐ์ค€์œผ๋กœ ์‚ผ์€ ๋ฒˆ๋“ค๊ณผ ๋‹ค๋ฆ…๋‹ˆ๋‹ค. | | `invalid_manifest` | manifest๊ฐ€ ์—†๊ฑฐ๋‚˜ ์ž˜๋ชป๋๊ฑฐ๋‚˜, ์•„์นด์ด๋ธŒ ๋ฐ–์˜ ๊ฒฝ๋กœ๋ฅผ ๊ฐ€๋ฆฌํ‚ค๊ฑฐ๋‚˜, ํ—ˆ์šฉ ๋ฒ”์œ„๋ฅผ ์ดˆ๊ณผํ•œ ์ž‘์—…์„ ์š”์ฒญํ•ฉ๋‹ˆ๋‹ค. | -| `unsupported_format` | ์ด ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์ ์šฉํ•  ์ˆ˜ ์—†๋Š” ํ˜•์‹ ๋˜๋Š” codec์œผ๋กœ patch๊ฐ€ ์ƒ์„ฑ๋์Šต๋‹ˆ๋‹ค. | +| `unsupported_format` | ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์ ์šฉํ•  ์ˆ˜ ์—†๋Š” ํ˜•์‹ ๋˜๋Š” codec์œผ๋กœ patch๊ฐ€ ์ƒ์„ฑ๋์Šต๋‹ˆ๋‹ค. | | `patch_apply_failed` | applier๊ฐ€ patch ์ ์šฉ์„ ๊ฑฐ๋ถ€ํ–ˆ๊ฑฐ๋‚˜, ๋ณต์›ํ•œ ๋ฒˆ๋“ค์„ ์“ธ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. | | `target_verification_failed` | ๋ณต์›ํ•œ ๋ฒˆ๋“ค์ด manifest๊ฐ€ ์•ฝ์†ํ•œ ๋‚ด์šฉ๊ณผ ๋‹ค๋ฆ…๋‹ˆ๋‹ค. | | `asset_merge_failed` | asset diff๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ๊ธฐ์ค€์œผ๋กœ ์‚ผ์•˜๋˜ ์„ค์น˜๋œ ์—…๋ฐ์ดํŠธ์™€ ๋ณ‘ํ•ฉํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. | diff --git a/docs/telemetry-callbacks.md b/docs/telemetry-callbacks.md index 34bc4e22..88584000 100644 --- a/docs/telemetry-callbacks.md +++ b/docs/telemetry-callbacks.md @@ -16,7 +16,7 @@ For the per-option reference, alongside every other option, see | Callback | Called when | Receives | |---|---|---| | `onDownloadStart` | the download of an available update begins | `(label)` | -| `onDownloadSuccess` | that download has completed. The install happens afterwards, so this says nothing about whether the update could be installed | `(label)` | +| `onDownloadSuccess` | the download of an available update has completed. The install happens afterwards, so this says nothing about whether the update could be installed | `(label)` | | `onUpdateArchiveResult` | an update published with a binary patch has been downloaded, before it is installed | `(label, result)` | | `onUpdateSuccess` | an installed update has run successfully, as of the [`notifyAppReady`](api-js.md#codepushnotifyappready) that marks it successful | `(label)` | | `onUpdateRollback` | an installed update failed to run and was rolled back to the previous version | `(label)` |