feat(settings): show our versioning, not Apple's marketing string
The row read '1.0.0 (2026081501)'. The first half has said 1.0.0 for every build ever made here and conveys nothing — nobody maintains it, and it cannot distinguish two builds. What identifies a build is the date-stamped number OAS assigns and writes into CFBundleVersion before signing. So the row now shows exactly that, dotted for reading: 2026.08.15.01. The same string the install page shows, which is the point — 'is the thing on my phone the thing on the site?' becomes a question you answer by looking rather than by remembering which link you tapped. A build that never went through OAS has no such number. Anything that is not exactly ten digits is shown verbatim as 'dev (…)' rather than sliced into a fake date. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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 = ({
|
||||
*/}
|
||||
<SettingsRow label="Version">
|
||||
<Text style={{ color: palette.textMuted, fontVariant: ['tabular-nums'] }}>
|
||||
{`${Constants.expoConfig?.version ?? '1.0.0'} (${Constants.nativeBuildVersion ?? 'dev'})`}
|
||||
{buildLabel()}
|
||||
</Text>
|
||||
</SettingsRow>
|
||||
{onShowCredits ? (
|
||||
|
||||
Reference in New Issue
Block a user