Repository navigation
fix(release): unpin APP_IOS_BUILD_NUMBER so the build number tracks the version - #682
Merged
Merged
Conversation
…he version Closes #513. The build number is derived from the app version in app.config.ts — 1.10.2 gives 11002 — and Android has always used that derivation. iOS stopped, because `APP_IOS_BUILD_NUMBER` was pinned in eas.json's production profile. The build list says exactly when and why: 1.10.2 shipped 11002 derived 11002 match 1.12.0 shipped 11200 derived 11200 match 1.12.0 shipped 11201 respin — the pin was added here 1.14.0 shipped 11201 derived 11400 FROZEN 1.15.0 shipped 11201 derived 11500 FROZEN 1.16.0 shipped 11201 derived 11600 FROZEN 1.16.1 shipped 11202 derived 11601 FROZEN The pin was added to respin 1.12.0, which is a real need — Apple scopes build-number uniqueness to the version string, so a second build of one version must change it. Then it stayed, and three releases inherited it. So the fix is not to teach release.sh to bump the pin, as the issue suggested. It is to stop pinning: the version bump release.sh already does moves the build number on its own, and there is no new step to forget. The env var survives as what it was meant to be — a per-build override for a respin, passed on the command line and nowhere else. Verified against the real config rather than by reading it: expo config → version 1.17.0, ios.buildNumber 11700, android.versionCode 11700 APP_IOS_BUILD_NUMBER=11701 expo config → ios.buildNumber 11701 11700 is above 11203, the highest ever shipped, so nothing goes backwards. Two things found on the way: The derivation cannot be extracted to a module. Expo transpiles app.config.ts to a single app.config.js and cannot resolve a relative import out of it — `Cannot find module './version-code'` fails every build. I tried it, it broke, and the note now says so, because the comment at the top of that file only warned about package imports. The tests import app.config.ts itself instead, so the rule is pinned without being copied. The scheme has a bound nobody had written down: two digits each for minor and patch, so 1.100.0 and 2.0.0 both encode to 20000. That now throws at config evaluation rather than emitting a duplicate that is only caught at submission, after a build has been paid for. The guard test was checked by re-adding the pin: it fails with `expected [ 'production' ] to deeply equal []`. RELEASE-PROCESS.md said nothing about build numbers at all, which is part of how this survived. It does now. typecheck 12/12, test:unit 7/7 --skip-nx-cache, lint 10/10.
This was referenced Sep 1, 2026
thinkclay
added a commit
that referenced
this pull request
Sep 1, 2026
…override (#684) Three corrections to what I wrote in #682, two of them mine to own. **The build command did not exist.** #682 told people to respin with `pnpm --filter scaffald-app eas:build:prod:ios`. There is no such script. The production path is `pnpm ship:ios` — which RELEASE-PROCESS.md already said correctly forty lines further down, so I introduced an inconsistency into a doc that was right. **The override advice was unverified.** I wrote `APP_IOS_BUILD_NUMBER=11701 pnpm ship:ios` as though exporting the variable reaches the build. It reaches `app.config.ts` wherever that file is *evaluated*, and an EAS cloud build evaluates it again on the worker, which does not inherit a local shell. I have not verified that a locally exported value reaches the binary, so the doc no longer claims it does. What is proven end to end is the version bump: app-v1.17.0 built on EAS as 1.17.0 / 11700. So respinning is now documented as "bump the patch" — same mechanism, already demonstrated, and it keeps one-tag-one-build intact, which a same-version respin quietly breaks. The override is documented with its real scope and with `eas env:create` as the cloud path, plus an instruction to delete it afterwards, since an override left anywhere persistent is precisely how #513 happened. **ITMS-90863 is expected.** Apple emails it after every iOS delivery: ExpoModulesCore Swift symbols that do not resolve against the macOS runtime. Delivery succeeds; it blocks nothing. It fires because supportsTablet makes the app eligible for Apple silicon Macs by default, which is an App Store Connect setting with no representation in this repo. Documented so the next one is recognised rather than re-investigated, with a pointer to #683 for the decision — and an explicit "do not set supportsTablet: false to silence it", which would drop real iPad support to quieten a warning about a platform we do not ship to. Verified after editing: build-number tests 7/7, and `expo config` still resolves 1.17.0 / 11700 — the comment sits in app.config.ts, so a bad edit there breaks every build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #513.
What was actually going on
The build number is derived from the app version in
app.config.ts—1.10.2→11002— and Android has always used that derivation. iOS stopped, becauseAPP_IOS_BUILD_NUMBERwas pinned ineas.json's production profile.The build list says exactly when and why:
1.10.21.12.01.12.01.14.01.15.01.16.01.16.1The pin was added for a real need — Apple scopes build-number uniqueness to the version string, so respinning one version must change the number. Then it stayed, and three releases inherited it.
So the fix isn't the one the issue suggested
#513 proposed teaching
release.shto bump the pin ineas.json. That adds a step that can be forgotten, which is the failure mode we already have.Unpinning removes the step instead: the
package.jsonbumprelease.shalready does moves the build number by itself. The env var survives as what it was meant to be — a per-build override for a respin, passed on the command line:Verified against the real config, not by reading it
11700 > 11203, the highest number ever shipped, so nothing goes backwards.
Two things found on the way
The derivation cannot live in its own module. I tried extracting it to
version-code.ts— Expo transpilesapp.config.tsinto a singleapp.config.jsand cannot resolve a relative import out of it, so every build dies withCannot find module './version-code'. The note at the top of that file only warned about package imports; it now says relative ones fail too. The tests importapp.config.tsitself, so the rule is pinned without being duplicated.The scheme has an undocumented bound. Two digits each for minor and patch, so
1.100.0and2.0.0both encode to20000. That now throws at config evaluation rather than emitting a duplicate — a duplicate is only discovered at submission, after a build has been paid for.The guard was checked by breaking it
Re-adding the pin fails the test with the offending profile named:
7/7 in
apps/scaffald/tests/build-number.test.ts.RELEASE-PROCESS.mdsaid nothing about build numbers at all, which is part of how this survived four releases; it does now.typecheck 12/12 ·
test:unit7/7--skip-nx-cache· lint 10/10Note on the
app-v1.17.0tagThat tag predates this fix, so a build cut from it would still use the pinned
11203. Flagged separately — it needs a decision, not a silent choice.🤖 Generated with Claude Code