fix(mobile): production OTAs no longer reach the previous major's store binaries (#14944)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Opus 5.5 authored and GitHub committed 2026-10-02 17:24:01 -07:00
1 parent 6414268859
commit 8ed276c246
3 files changed
+25 -3

No files matched your search

+5 -2
View File
@@ -18,8 +18,11 @@ name: Mobile EAS Production
# Store stays a manual App Store Connect step.
# 2. OTA: publish a production-channel update for each platform where at
# least one finished production build matches the current native
# fingerprint. Old-version binaries with a matching fingerprint receive
# it too. When native drift means no binary could install the update,
# fingerprint. Older binaries of the same major version with a matching
# fingerprint receive it too; the major version is part of the
# fingerprint (apps/mobile/fingerprint.config.js), so a new major never
# reaches the previous major's store binaries over the air. When native
# drift means no binary could install the update,
# it is skipped and flagged in the job summary instead of published
# into the void.
# workflow_dispatch remains as a manual override for both modes (e.g. to
+18
View File
@@ -0,0 +1,18 @@
// @ts-check
const fs = require("node:fs");
const path = require("node:path");
// Expo's fingerprint ignores the app version, so binaries of different majors
// share a runtime version whenever native code is unchanged, and a production
// OTA from main would reach every older store binary. Hashing the major
// version keeps each major's OTAs on its own binaries: a new major reaches
// users only once its store build is promoted.
const appConfig = fs.readFileSync(path.join(__dirname, "app.config.ts"), "utf8");
const majorVersion = appConfig.match(/^ {2}version: "(\d+)\./m)?.[1];
if (!majorVersion) {
throw new Error("fingerprint.config.js could not read the app version from app.config.ts");
}
module.exports = {
extraSources: [{ type: "contents", id: "appMajorVersion", contents: majorVersion }],
};
+2 -1
View File
@@ -66,9 +66,10 @@
"ignoreIssues": { "src/components/ui/*.tsx": ["exports", "nsExports", "duplicates"] },
},
"apps/mobile": {
// Expo loads plugins by string; Metro embeds the browser entry in the native WebView.
// Expo loads plugins and the fingerprint config by string; Metro embeds the browser entry in the native WebView.
"entry": [
"index.ts!",
"fingerprint.config.js",
"plugins/*.cjs",
"scripts/generate-device-stream.mts",
"src/features/devices/device-stream.browser.ts!",