
Expo, part 5: builds in EAS — profiles, APK and AAB, signature keys, one project per app, and over-the-air updates
🌐 Machine-translated from Russian. Show original
In this part:
Installing the EAS CLI and logging in#
npm install --global eas-cli
eas login
eas whoami
You can also use it without a global installation: npx eas-cli@latest build ... — that's how you always get the latest version.
One project expo.dev per app#
Our most expensive mistake at the start: building the app in the wrong project expo.dev. The project stores:
- Android signature key (keystore) and iOS certificates;
- push keys (FCM V1, APNs) — and push tokens are tied to
projectId; - build history and version numbers;
- EAS Update channels.
If you accidentally build Kommit Chat" in a WorkTime project, you get an APK signed with someone else's key, with someone else's push keys. The team has several apps, each with its own project: Kommit Chat" — only in ITgovChatApp, WorkTime — only in theirs.
Linking a project to an existing expo.dev project by ID (Project settings → ID):
eas init --id <ID проекта>
The command writes the extra.eas.projectId to the app.json. Our build script checks that the projectId in the app.json matches the expected one and stops if not. Tip: write the project ID in the app's README.
eas.json: profiles#
{
"cli": { "appVersionSource": "remote" },
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal",
"android": { "buildType": "apk" },
"autoIncrement": true
},
"production": {
"autoIncrement": true
}
},
"submit": { "production": {} }
}
| Profile | What results | For whom |
|---|---|---|
| development | debug build with expo-dev-clientconnects to npx expo start | developers |
| preview | release APK build for direct installation | testers, pilot in company |
| production | AAB for Google Play and IPA for the App Store | stores |
"appVersionSource": "remote"— build numbers (versionCode / buildNumber) are stored by EAS, and theautoIncrementincrements them itself. No longer need to remember "what number was last time" — Google Play will not accept builds with re-versionCode.- You change the version the user sees (
"version": "1.0.0"in app.json).
For development build, install the module:
npx expo install expo-dev-client
eas build --profile development --platform android
APK or AAB#
| APK | AAB (Android App Bundle) | |
|---|---|---|
| Installing | directly on your phone | only through Google Play |
| Google Play | new apps does not accept APK format | the mandatory |
| The user's size | one file across all architectures | Play assembles the optimal APK for the |
| When | testing, internal apps, handouts from the site, | publishing in the |
Assembly:
eas build --platform android --profile preview # APK для тестировщиков
eas build --platform android --profile production # AAB для Google Play
eas build --platform ios --profile production # IPA для App Store / TestFlight
Assembly takes 10–20 minutes in the cloud (the free plan may be on the waiting list). At the end — a link and a QR code for installation.
The APK size can be reduced by limiting processor architectures (we have only arm64-v8a and armeabi-v7a, without x86 emulators) via the expo-build-propertiesplugin.
Android Signature Key (keystore)#
During the first build, EAS will ask: "Generate a new Android Keystore?" — answer Y. The key will be saved in the EAS project.
What you need to know:
- Every app update must be signed with the same key. Lost the key (or built it in another project) — users will not have the APK installed over the old one, so they will have to uninstall the app.
- Play App Signing is enabled for Google Play: Google stores the app signing key, and your key from EAS becomes the "upload key." If the upload key is lost, it can be reset via Google Play support.
- Back up keystore:
eas credentials→ Android → Keystore → Download. Store in the company's password vault, not in the repository.
Before assembly#
Before each assembly, we automatically start:
npx expo-doctor@latest # совместимость версий модулей и конфигурации
npx tsc --noEmit # ошибки типов
npm test # тесты чистой логики (разбор SSE, форматирование)
A cloud build that crashed after 15 minutes due to a typo in the types — lost time and a free plan limit.
Over-the-air updates: EAS Update#
EAS Update delivers new JavaScript code and images to already installed apps without a new publication in the store. Fix text, screen logic, or urgent errors in minutes.
npx expo install expo-updates
eas update:configure
eas update --channel production --message "Исправлена ошибка в списке диалогов" --environment production
- The channel is set in the build profile in eas.json; only assemblies in that channel
productionreceive updates. - The
--environmentflag (which EAS environment variables to use) is mandatory starting from SDK 55. - The update downloads in the background at launch and is applied the next time the application is launched .
- runtimeVersion determines which builds are compatible with the update. If you added a native module, changed permissions, or plugins — you need a new build through the store, OTA won't help.
Store rules allow this to fix bugs and improve the app, but not change its purpose — significant feature changes are made through the regular moderated release.
Automatic assembly#
eas build can be run from CI (GitHub Actions, etc.) with the Expo access token in CI secrets — the variable EXPO_TOKEN. The token is created on expo.dev in the account settings, preferably for a robot account with minimal rights. More about CI — the series "Docker and CI/CD from scratch."
Assembly checklist#
- Each application has its own expo.dev project, and the ID is recorded in the README
-
projectIdin app.json is checked before assembly - Development / preview (APK) / production (AAB) profiles
-
appVersionSource: remoteandautoIncrement - Keystore created in EAS, backup in password vault
- Before assembly: expo-doctor, type checking, tests
- EAS Update is configured for fast JS code fixes
The final step — stores: Expo, part 6: publishing to Google Play and App Store — accounts, testing, account deletion, and data forms.
Comments · 0
No comments yet.Sign in to comment, rate and see all comments.