fix(mobile): switch to remote appVersionSource for auto-incrementing build numbers

Change `appVersionSource` from `"local"` to `"remote"` in `eas.json` so EAS
tracks build numbers on its servers. This ensures every CI build gets a
unique, ever-increasing version without needing to commit bumps back to
the repo — fixing the App Store Connect "bundle version already used"
rejection.

Also bump `ios.buildNumber` to "7" and `android.versionCode` to 7 in
`app.json` (above the previously uploaded version "6") so the remote
version initializes correctly.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-16 16:57:52 +00:00
parent 84ce65f532
commit 4c8926a1fa
4 changed files with 30 additions and 3 deletions
+18
View File
@@ -67,6 +67,24 @@ An **EAS Cloud Workflow** (`mobile/.eas/workflows/create-builds.yml`) automates
> **Prerequisite:** An App Store Connect API Key must be configured in EAS for non-interactive submission. See [Troubleshooting → "Session expired"](#session-expired-local-session-during-ios-build) below for setup instructions. > **Prerequisite:** An App Store Connect API Key must be configured in EAS for non-interactive submission. See [Troubleshooting → "Session expired"](#session-expired-local-session-during-ios-build) below for setup instructions.
### Version Management
Build numbers (iOS `buildNumber` / Android `versionCode`) are managed **remotely** by EAS. The `eas.json` configuration uses:
```json
{
"cli": { "appVersionSource": "remote" },
"build": { "production": { "autoIncrement": true } }
}
```
- **`appVersionSource: "remote"`** — EAS stores the current build number on its servers instead of reading it from `app.json`. This ensures every CI build gets a unique, ever-increasing number without needing to commit version bumps back to the repository.
- **`autoIncrement: true`** — EAS automatically increments the build number before each production build.
The `ios.buildNumber` and `android.versionCode` values in `app.json` serve as the **initial seed** when the remote version is first created; after that they are informational only. Do not rely on them for the actual version submitted to the stores.
> **Tip:** To check or manually set the remote version, use `eas build:version:get` and `eas build:version:set`.
## Authentication ## Authentication
### SSO Login Flow ### SSO Login Flow
+9
View File
@@ -88,6 +88,15 @@ An EAS Cloud Workflow (`mobile/.eas/workflows/create-builds.yml`) runs automatic
> An [App Store Connect API Key](https://docs.expo.dev/app-signing/app-credentials/#app-store-connect-api-key) must be configured in EAS (`eas credentials`) for non-interactive submission. > An [App Store Connect API Key](https://docs.expo.dev/app-signing/app-credentials/#app-store-connect-api-key) must be configured in EAS (`eas credentials`) for non-interactive submission.
### Version management
Build numbers (`ios.buildNumber` / `android.versionCode`) are managed **remotely** by EAS — see `eas.json`:
- `"appVersionSource": "remote"` — EAS tracks the current build number on its servers, so each CI build automatically receives a unique, incrementing number without committing changes back to the repo.
- `"autoIncrement": true` (production profile) — EAS bumps the build number before every production build.
The values in `app.json` are used as the **initial seed** when the remote version is first created; after that they are informational only. Use `eas build:version:get` / `eas build:version:set` to inspect or override the remote version.
## Configuration ## Configuration
No code changes are needed to point the app at a different server. The server URL is entered by the user on the login screen and stored in the device's secure store. No code changes are needed to point the app at a different server. The server URL is entered by the user on the login screen and stored in the device's secure store.
+2 -2
View File
@@ -44,7 +44,7 @@
} }
] ]
}, },
"buildNumber": "3" "buildNumber": "7"
}, },
"android": { "android": {
"adaptiveIcon": { "adaptiveIcon": {
@@ -71,7 +71,7 @@
"category": ["DEFAULT"] "category": ["DEFAULT"]
} }
], ],
"versionCode": 1 "versionCode": 7
}, },
"web": { "web": {
"favicon": "./assets/favicon.png", "favicon": "./assets/favicon.png",
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"cli": { "cli": {
"version": ">= 5.9.0", "version": ">= 5.9.0",
"appVersionSource": "local" "appVersionSource": "remote"
}, },
"build": { "build": {
"development": { "development": {