Setting Up Dual Apps with Expo: Development and UAT
July 28, 2024This document outlines our specific process for setting up and managing two separate apps using Expo: a Development app and a User Acceptance Testing (UAT) app. This dual-app approach allows our team to rapidly iterate on new features while maintaining a stable version for stakeholder testing and demos.
Before proceeding, ensure you have:
We assume you have already initialized your Expo project according to the official documentation.
We use a modified GitFlow workflow:
Understanding this workflow is crucial for following the setup process below.
Convert the default app.json
to app.config.js
to enable dynamic configuration:
const IS_DEV = process.env.APP_VARIANT === 'dev'; export default { name: IS_DEV ? 'Appy Dev' : 'Appy', slug: 'louvelle-mobile', ios: { supportsTablet: true, bundleIdentifier: IS_DEV ? 'app.appy.dev' : 'app.appy.prod', }, // ... other configurations };
For more on dynamic configuration, see the Expo documentation.
Before configuring EAS, create your apps in App Store Connect:
Set up your eas.json
file with the information from App Store Connect:
{ "build": { "development": { "developmentClient": true, "distribution": "internal" }, "dev": { "autoIncrement": true, "channel": "dev", "env": { "APP_VARIANT": "dev" } }, "production": { "autoIncrement": true, "channel": "production" } }, "submit": { "production": { "ios": { "appleId": "your-apple-id@example.com", "ascAppId": "your-production-asc-app-id", "appleTeamId": "your-apple-team-id" } }, "dev": { "ios": { "appleId": "your-apple-id@example.com", "ascAppId": "your-dev-asc-app-id", "appleTeamId": "your-apple-team-id" } } } }
Replace the placeholders with your actual values.
Run the following command to set up credentials for both apps:
expo credentials
For more information, see:
Build and submit your apps using EAS:
For the development app:
eas build --profile dev --platform ios eas submit --profile dev --platform ios
For the production app:
eas build --profile production --platform ios eas submit --profile production --platform ios
We use a daily cron job with GitHub Actions to build and deploy the app to TestFlight for all changes in the last 24 hours. This ensures a new build in TestFlight every morning for dev builds.
To manually trigger a build for the louvelle-dev app:
This dual app setup with Expo streamlines our development process, allowing rapid feature iteration while maintaining a stable version for stakeholders. While initial setup requires effort, the long-term benefits in flexibility and reliability are substantial.
Remember, you can further customize this setup to fit specific needs, such as adding more environments or configuring different backend URLs for each app.