Main Reference
Package Installation
-
Install the packages for expo-updates
npx expo install expo-updates
Config the eas.json
eas.json
-
Set update config:
eas update:configure
it should set the
channel
properties in oureas.json
in all environments.
Channels
-
According to this documentation we can check existing channels (the deployment stages) by
eas channel:list
-
We can view a specific channel by
eas channel:view production
-
We can create a channel by
eas channel:create [channel-name]
Let's create a channel called
prod
:then in expo-development portal:
Branches
-
A new branch
version-1.0
is automatically created and attached toprod
channel
Execution of the OTA Update and Caveat
-
We add a script in
package.json
:env-cmd -f .env-cmdrc -e default,prod eas update --branch uat --message "Update" --clear-cache
-
Note that by default if no
env
variable is declared, allenv
variables will be erased. -
This is why we declare all environment variables by
env-cmd -f .env-cmdrc -e default,prod
in the deployment script.