VSCode plugin 'Expo Tools': https://marketplace.visualstudio.com/items?itemName=byCedric.vscode-expo
app.json / app.config.js / app.config.ts
Configuration with app.json / app.config.js: https://docs.expo.dev/workflow/configuration/
Info.plist can also be modified with a config plugin: https://docs.expo.dev/guides/config-plugins/#modifying-the-infoplist
"NSCameraUsageDescription": "This app uses the camera to scan barcodes on event tickets.",
New local CLI for SDK >= 46: https://docs.expo.dev/more/expo-cli
Old, deprecated, global CLI for SDK < 46: https://docs.expo.dev/archived/expo-cli
Local CLI (introduced in SDK 46)
SDK 46 (released August 2022) removes the global npm install
The New Expo CLI (2022-08) - https://blog.expo.dev/the-new-expo-cli-f4250d8e3421
- A new “Local Expo CLI” replaces the “Global Expo CLI”
- In the new Local Expo CLI,
expo ejectis no longer available, it’s been fully replaced by
npx expo prebuild
Beta: Local Expo CLI (2022-04) - https://blog.expo.dev/new-versioned-expo-cli-cf6e10632656
expo install instead of
npm install because it picks the library versions compatible with the Expo SDK
npm installto add Expo SDK packages This will ensure that you get a version of the package that is compatible with the SDK version in your app. If you use npm install directly instead, you may end up with a newer version of the package that isn't supported in Expo Go yet.
This is also explained at https://reactnavigation.org/docs/getting-started#installing-dependencies-into-an-expo-managed-project
expo init <appname> --yarn
expo init <appname> -t expo-template-blank-typescript
expo init --template bare-minimum # warning: does not add react-navigation!
expo init options at https://docs.expo.dev/workflow/expo-cli/#expo-init
Note that option
--name is deprecated, if you use it says "Use
expo init [name] instead of
Available templates: https://github.com/expo/expo/tree/main/templates
Use TypeScript: https://docs.expo.dev/guides/typescript/
Validate package versions compatibility and install compatible versions
npx expo install --check # Check which installed packages need to be updated
npx expo install --fix # Automatically update any invalid package versions
You can check/fix specific packages, eg
npx expo install expo-camera --check.
npx expo install --check will output:
Some dependencies are incompatible with the installed expo version:
@email@example.com - expected version: 4.4.2
Your project may not work correctly until you install the correct versions of the packages.
Install individual packages by running npx expo install @firstname.lastname@example.org
✔ Fix dependencies? (Y/n)
Shift+i allows you to choose in which simulator to run the app on
Expo Dev Client
Replaces Expo Go, which contains a fixed collection of native modules and does not allow custom native code.
It’s a React Native library that gives you the same experience as Expo Go, but with your own custom runtime. source
Expo Go app is a standard client containing a preset collection of modules. As your project moves toward release, you may find that you need to customize your project, either to reduce your bundle size, to use a module offered by developers in the React Native community, or even to add your own custom native code.
Development builds of your app are Debug builds containing the
(managed workflow) If you add or change the version of any modules in your project that includes native code or make most changes to your app.json, you’ll need to generate a new custom client to be able to run your app.
You need to have
"developmentClient": true eas.json:
This creates a 'Development build', a Debug build of your project that includes the expo-dev-client. See https://docs.expo.dev/development/getting-started/ and https://docs.expo.dev/development/build/.
To install run
expo install expo-dev-client, then
To create a development build do:
eas build -p ios --profile development
eas build -p android --profile development
After the build is created, install it on your device. Afterwards, to run the app do
expo start --dev-client and click 'i' or 'a', or scan the QR code.
Now you won't have to wait for the native build process again until you change the underlying native code that powers your app.
In addition to
expo eject, now there is also
See the 2 images in https://blog.expo.dev/expo-managed-workflow-in-2021-d1c9b68aa10
Info about prebuild: https://github.com/expo/fyi/blob/main/prebuilding.md
you might need to use a library that doesn't have a config plugin yet, or maybe you need to write some custom native code yourself. For these cases you'll have to manually modify the
androidfolders, doing this means you'll no longer be able to safely rerun
Eject moves from manged to bare, and it's run once ever.
expo prebuildis very similar to
expo eject, the core difference being that eject is intended to be run once, and prebuild can be used multiple times. The eject command assumes that your ios and android folders are modified by hand (bare workflow) and will warn you if they might be overwritten, whereas the prebuild command should only be used when your
androidfolders are completely generated and can be regenerated any time (kinda like the
More info about prebuild in 'Adding custom native code': https://docs.expo.dev/workflow/customizing/
Expo Application Services. A cloud build service capable of building projects with arbitrary native code.
Install the CLI:
npm install -g eas-cli (npm is recommended instead of yarn)
Check the current user:
expo build’s Final Year: https://blog.expo.dev/turtle-goes-out-to-sea-d334db2a6b60
eas build:configure -> Generates eas.json. Learn more at https://docs.expo.dev/build-reference/build-configuration/
To install an app to an iPhone, first register the device UDID at https://developer.apple.com/account/resources/devices/list.
To register any iOS devices you would like to develop on to your ad hoc provisioning profile use
eas build -p android --profile preview
eas build -p ios
Android and iOS build:
eas build -p all
Build locally (eg to generate an aab file to upload to Google Play):
eas build --local
- "Uses your own hardware to build your apps locally and EAS to manage your app-signing credentials" (source)
Download a simulator build from EAS servers and run it directly on your emulator/simulator in a snap:
eas build:run -p ios- https://docs.expo.dev/build-reference/simulators/#installing-build-on-the-simulator
eas build:run -p android- https://docs.expo.dev/build-reference/apk/#emulator-virtual-device
From the Expo build process's perspective, there is no difference whether an app is signed with an upload certificate or an app signing key. Either way,
eas buildwill generate an APK or AAB signed with the keystore currently associated with your application. If you want to generate an upload keystore manually, you can do that the same way you created your original keystore.
App store submissions.
The very first Android build must be uploaded manually to Google Play - see https://docs.expo.dev/submit/android/#manually-uploading-your-app-for-the-first. This is not required on App Store (iOS).
After building with
eas build we can do
eas submit -p ios to publish to the App Store.
There is also the option
--auto-submit, so we can do both build and submit, eg:
eas build -p ios --profile production --auto-submit.
To publish to Google Play we need the service account key, which gives API access: https://github.com/expo/fyi/blob/main/creating-google-service-account.md. Note that the API access menu item appears at the main Google Play console page, not the app-specific page.
Deliver small updates of the non-native parts of your app (JS, styling, image assets...) to your users in between build and submit cycles
EAS Update also doubles as a workflow efficiency tool, streamlining feedback loops by allowing teams to share previews of their projects during PR review. We love being able to push to GitHub, trigger a GitHub action to publish an update, then see it immediately inside of a development build.
Using Expo OTA Updates in your React Native app - Eric Samelson at @ReactEurope 2020: https://www.youtube.com/watch?v=Si909la3rLk
Run the production app
See https://docs.expo.dev/workflow/development-mode/. There is also a switch in http://localhost:19002/.
expo start --no-dev --minify
# or if we've done a prebuild
expo start --no-dev --minify --dev-client
Environment variables and configuration
Configuration with app.json / app.config.js: https://docs.expo.dev/workflow/configuration/
Environment variables in Expo: https://docs.expo.dev/guides/environment-variables/
Environment variables and secrets: https://docs.expo.dev/build-reference/variables/
According to https://docs.expo.dev/build-reference/variables/#can-i-share-environment-variables-defined-in
expo start does not pick variables defined in eas.json:
When you define environment variables on build profiles in eas.json, they will not be available for local development when you run
- SDK 48 - 2023-02
- SDK 47 - 2022-11
- SDK 46 - 2022-08
- SDK 45 - 2022-05
- SDK 44 - 2021-12 - CHANGELOG
- SDK 43 - 2021-10 - CHANGELOG - Replaces Unimodules with Expo modules
- SDK 42 - 2021-07 - CHANGELOG
Unimodules -> Expo modules
Using Expo modules in a standard React Native app (created with
npx react-native init): https://docs.expo.dev/bare/installing-expo-modules
Expo (Native) Modules API
- https://codedrift.com/thunked/developing-react-native-with-expo-and-flipper and https://blog.expo.dev/developing-react-native-with-expo-and-flipper-8c426bdf995a (is the same)
- Example app: https://github.com/jakobo/expo-cdc-example