diff --git a/src/settings/SettingsScreen.tsx b/src/settings/SettingsScreen.tsx index 02e328b..39ee3e0 100644 --- a/src/settings/SettingsScreen.tsx +++ b/src/settings/SettingsScreen.tsx @@ -76,6 +76,26 @@ export type SettingsScreenProps = { * No tabs. The tabbed variant exists for pages with several named sections to choose between; this * one has the app's own section and About, and a row of two pills is chrome rather than navigation. */ +/** + * Which build this is, in OUR versioning rather than Apple's. + * + * `1.0.0` is a marketing string nobody maintains — it has said 1.0.0 for every build ever made here and + * conveys nothing. What identifies a build is the date-stamped number OAS assigns and writes into + * CFBundleVersion before signing, which is also what the install page shows. Showing the same string in + * both places is the whole point: it makes "is the thing on my phone the thing on the site?" answerable + * by looking, rather than by remembering which link was tapped. + * + * Dotted for reading, stored undotted — 2026081501 becomes 2026.08.15.01. + * + * A build that has not been through OAS (a cable install, a Metro run) has no such number, so anything + * that is not exactly ten digits is shown verbatim instead of being mangled into a fake date. + */ +function buildLabel(): string { + const raw = Constants.nativeBuildVersion ?? ''; + if (!/^\d{10}$/.test(raw)) return raw ? `dev (${raw})` : 'dev'; + return `${raw.slice(0, 4)}.${raw.slice(4, 6)}.${raw.slice(6, 8)}.${raw.slice(8)}`; +} + export const SettingsScreen = ({ title, onClose, @@ -166,7 +186,7 @@ export const SettingsScreen = ({ */} - {`${Constants.expoConfig?.version ?? '1.0.0'} (${Constants.nativeBuildVersion ?? 'dev'})`} + {buildLabel()} {onShowCredits ? (