Starting template for expo mobile app development under the city of Bratislava. In general, follow https://docs.expo.dev/, below are some quick references.
- You have to install eas-cli to connect and build project
npm install --global eas-cli
- Afterwards initiate
eas init --id {ID}
We are using eas-development builds - read more here https://docs.expo.dev/develop/development-builds/introduction/
Quick reference:
# you'll want eas-cli installed globally
# install local packages
yarn
# local development once you have build installed and are changing only javascript
yarn start
# list existing builds (most of the time, you'll install the latest matching from here)
east build:list
# Android emulator or device build
eas build --profile development --platform android
- Go to github and create new release. For production the tag should start with
prod
(prod1.2.1
) and for stagingstaging
(staging1.2.1
).
Release to play store needs the .aab file build, the github release above submits app version to the play store so only thing that needs to be done is:
- Go to the play store console and submit the release.
Release to InTune needs to be built like .apk file which requires different build profile and also some tweaks because of InTune and Play store cannot have the same package name. All of this is done by environment variable and github actions in release.
-
Go to expo build and download it.
-
Send the apk file to people responsible for distribution of InTune application
Whenever there is occurrence of changes that needs to be delivered ASAP the OTA update is best choice for that.
In Github Releases create and start the tag with ota
(ota-prod1.2.1
or ota-staging1.2.1
).
We can force users to update application by calling /system/version
POST endpoint with newest version which will open "Update App" modal
Warning
Beware of wrong version posting to the endpoint, the app wont work if the version is newer than released version
Public ones available in the final frontend package go to .env
prefixed with EXPO_PUBLIC_
. Access them using environment.ts
. Secrets go to Expo secrets (and are afterwards available in app.config.js - and probably elsewhere - as environment variables) - see Expo secrets docs.
Tests are made with Maestro testing library and to execute them you need to have maestro installed
Install maestro macOS
brew install maestro
Install maestro windows
curl -fsSL "https://get.maestro.mobile.dev" | bash
Run test (login)
maestro test .maestro/#.yaml