- Create a new file at the root of the project called
.env.development; - Go to your firebase console for your app and download the
google-services.jsonand copy it in the root of your project and remove it from .gitignore - Add the following lines with values from your cognito app client for your development environment:
EXPO_PUBLIC_AWS_REGION={{value}} EXPO_PUBLIC_USER_POOL_ID={{value}} EXPO_PUBLIC_USER_POOL_CLIENT_ID={{value}} EXPO_PUBLIC_AWS_DOMAIN={{value}}
- Create a new build either a local build with
npx expo prebuild --platform <platform>or a new eas build to be downloaded:eas build --platform all --profile development. Using the prebuild value since it's not an eas build it will require us to have also the environment variables from theeas.jsonin the.env.developmentcreated at point 1. - Run the the app in development mode:
npm run start
- Create a new file at the root of the project called
.env.test; - Check if the
google-services.jsonis present in the secrets (eas secret:list), otherwise go to your firebase console for your app and download thegoogle-services.jsonand copy it in the root of your project - Add the following lines with values from your cognito app client for your test environment:
EXPO_PUBLIC_AWS_REGION={{value}} EXPO_PUBLIC_USER_POOL_ID={{value}} EXPO_PUBLIC_USER_POOL_CLIENT_ID={{value}} EXPO_PUBLIC_AWS_DOMAIN={{value}}
- Update your eas secrets with the values from your
.envfile witheas secret:push --scope project --env-file ./.env.test - Create a new eas build
eas build --platform all --profile preview - Download the build from
expo.dev. - Start testing :)
- Create a new file at the root of the project called
.env.production; - Check if the
google-services.jsonis present in the secrets (eas secret:list), otherwise go to your firebase console for your app and download thegoogle-services.jsonand copy it in the root of your project. If not present in secrets push it. - Add the following lines with values from your cognito app client for your production environment:
EXPO_PUBLIC_AWS_REGION={{value}} EXPO_PUBLIC_USER_POOL_ID={{value}} EXPO_PUBLIC_USER_POOL_CLIENT_ID={{value}} EXPO_PUBLIC_AWS_DOMAIN={{value}}
- Update your eas secrets with the values from your
.envfile witheas secret:push --scope project --env-file ./.env.production - Update
buildNumberandversionCodefrom yourapp.jsonfile and commit them. - Create a new eas build
eas build --platform all --profile production - Upload the build through Testflight/Stores