Merge pull request #744 from christianlouis/copilot/increment-version-eas-or-app-json

fix(mobile): switch to remote appVersionSource for auto-incrementing build numbers
This commit is contained in:
Christian Krakau-Louis
2026-03-16 17:59:46 +01:00
committed by GitHub
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": {