Skip to content

feat(ota): replace EAS Update with Codemagic Patch - #1

Merged
hyochan merged 1 commit into
mainfrom
feat/codemagic-patch-ota
Nov 17, 2026
Merged

hyochan merged 1 commit into
mainfrom
feat/codemagic-patch-ota

Conversation

@hyochan

@hyochan hyochan commented Nov 17, 2026

Copy link
Copy Markdown
Member

Summary

Replace expo-updates / EAS Update with Codemagic Patch (@codemagic/react-native-patch 0.7.0), hosted for the OpenIAP team at https://ota.codemagicpatch.dev (apps BooKoo-iOS, BooKoo-Android).

  • Config: app.config.ts drops runtimeVersion/updates and adds the Patch config plugin. QA builds read the Staging deployment, store builds read Production. The deployment keys only let a build ask for updates, so they ship in every binary and live in shared/otaDeployments.json.
  • App: the cold-start gate (coldStartUpdate.tsx), the soft update sheet, the recovery restart and the diagnostics screen now use Patch (checkForUpdate → downloadUpdate → installUpdate → restartApp, notifyAppReady, getRunningBundleUpdateMetadata).
  • Fixes found in self-review: a download that finishes after the 4 s splash budget no longer restarts the app mid-use (it waits for the next cold start), and the cold-start check records its attempt first so the soft update sheet cannot start a concurrent download.
  • Release: bun ota:release[:ios|:android] (scripts/ota-release.zsh) replaces eas:prod:updates, keeping the main / clean-tree / CI / compatibility gates and bundling with the production EAS environment through eas env:exec.
  • Docs and skills: release-update, update-version and docs/ai/WORKFLOWS.md describe the Patch flow.

Store binaries up to 1.4.0 still run expo-updates; the first Patch binary is 1.5.0, so OTA releases reach devices only after that store release.

Verification

  • bun check (227 suites, 1,740 tests) and bun lint:all pass locally.
  • Local QA builds: Android release APK and iOS simulator Release build with the Patch plugin.
  • Device E2E with a real Staging release v1 (see the gate comment below).

Over-the-air updates now ship through Codemagic Patch, hosted for the OpenIAP
team, instead of expo-updates and EAS Update. QA builds read the Staging
deployment and store builds read Production; the public deployment keys live
in shared/otaDeployments.json and reach the binary through the SDK's Expo
config plugin.

The cold-start gate keeps its bounded check and now confirms a healthy bundle
with notifyAppReady so Patch does not roll an update back. A download that
finishes after the splash budget waits for the next cold start instead of
restarting mid-use, and the cold-start check records its attempt first so the
soft update sheet cannot start a concurrent download.

bun ota:release replaces eas:prod:updates with the same main, clean-tree, CI
and compatibility gates, bundling with the production EAS environment through
eas env:exec. Store binaries up to 1.4.0 still run expo-updates; the first
Patch binary is 1.5.0.
@hyochan hyochan added 📦 update packages ✨ configuration Configuration for better code 🎯 feature New feature labels Nov 17, 2026
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bookoo-public Ready Ready Preview Nov 17, 2026 4:32pm UTC

@hyochan

hyochan commented Nov 17, 2026

Copy link
Copy Markdown
Member Author

Device gate: E2E result

Native wiring changed (expo-updates removed, Patch config plugin added), so device regression ran before review.

QA builds (dev.hyo.bookoo.qa, 1.4.0) built locally with the Patch plugin, on the Staging deployment of the hosted Patch server.

Gate Android (Pixel 2, physical) iOS (iPhone 17 Pro simulator)
Plugin wires keys, URLs and bundle selection PASS (strings.xml, MainApplication) PASS (Info.plist, AppDelegate)
Cold start on the embedded bundle PASS, 0 JS/runtime errors PASS
Staging release v1 passes the native fingerprint check uploaded uploaded
Next launch downloads, applies and restarts PASS PASS
Following launch runs the update without rollback PASS, 0 errors PASS
Patch server metrics (downloaded / ready / applied / failed / active) 1 / 1 / 1 / 0 / 1 1 / 1 / 1 / 0 / 1

Notes: the iOS log shows expo-notifications failing to read its registration info because the unsigned simulator build has no keychain entitlement; unrelated to Patch. Android logs Patch falling back from an in-place bundle swap to a ReactHost reload (info level); the update still applied.

Not covered: signed store builds and the Production deployment (first Patch store binary is 1.5.0), and signed-in flows (no production credentials are entered by automation).

@hyochan
hyochan merged commit 2f23f8f into main Nov 17, 2026
6 checks passed
@hyochan
hyochan deleted the feat/codemagic-patch-ota branch November 17, 2026 16:36

This branch was successfully deployed

1 active deployment
Preview — 7a9f9a02 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ configuration Configuration for better code 🎯 feature New feature 📦 update packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant