Expo Development Lifecycle - From Code to Play Store
In the Expo ecosystem, EAS (Expo Application Services) has simplified how we handle native builds. Central to this power is the `eas.json` file, which allows you to define different Build Profiles. This guide breaks down the 3 standard configurations -- Development, Preview, and Production -- and maps them to a realistic feature lifecycle.
Before diving into the lifecycle, let's define what these profiles actually do: The diagram below illustrates how a code-feature moves through these configurations:1. Understanding the Build Configurations
2. The Feature Lifecycle Flow
2.1 Phase 1: Implementation & Development
In this phase, you are building the feature locally. You need a Development Build to support any custom native modules you've added. Once the feature is "dev-complete," you move to the Preview phase. This creates a release-build version of your app that can be shared with testers via a URL without going through the Play Store. Upon a QA certifying a build as good, we generate the Android App Bundle (.aab) for the Google Play Store.
--
--
```
npm test
```
```
# Build the development client for Android
eas build --profile development --platform android
```
Once the build is finished, install the .apk on your physical device.
```
npx expo start --dev-client
```
Note: Ensure your physical device is on the same Wi-Fi as your machine or connected via USB with port forwarding.2.2 Phase 2: QA & Device Configuration Testing
```
eas build --profile preview --platform android
```
```
# Example: Running Detox E2E tests against the preview build
detox build -c android.emu.release
detox test -c android.emu.release
```
ProTip: If you were to use Maestro, this step becomes redundant.2.3 Phase 3: Production Release
```
eas build --profile production --platform android
```
```
# Submit the last successful build to the Play Store
eas submit --platform android
```3. Example eas.json Configuration
