Skip to main content

Getting started with Expo projects

You can generate React Native projects with the React Native CLI or with the Expo CLI. Expo is a toolchain that allows you to quickly get a React Native app up and running without having to use native code in Xcode or Android Studio.

In this guide we discuss how to set up, test, code sign and deploy your React Native project built with the Expo CLI.

Adding an Expo project to BitriseClick to copy link

Add your project the same way as any other: see Adding a new project for the full walkthrough of the wizard. This section covers what's specific to Expo.

How the scanner detects an Expo projectClick to copy link

The project scanner first looks for a package.json file that lists react-native as a dependency. If it also lists expo as a dependency, and there's an app.json, app.config.js, or app.config.ts file alongside package.json, Bitrise registers the project as Expo-based rather than plain React Native. In this mode, the scanner skips checking for native ios/ and android/ directories.

What you can configureClick to copy link

During the CI configuration stage, the wizard shows:

  • Expo project directory: the directory containing your package.json and Expo config file.
  • Platform: which platform to build for EAS Build: all, Android, or iOS.

Installing JavaScript dependenciesClick to copy link

If the Bitrise project scanner has successfully scanned your project, Run npm command or Run yarn command Steps will be included in your default Workflows. These Steps can install the missing JavaScript dependencies for your app.

For native Android dependencies, you can use the Install missing Android SDK components Step.

For native iOS dependencies, you can use, among others, the Brew install Step or the Run CocoaPods install Step.

To install JavaScript dependencies with npm:

Using Yarn instead of npm

In this guide, we're using npm to install JavaScript dependencies. However, you can use the Run yarn command Step: it can install missing JS dependencies without any additional configuration required.

  1. Log in to Bitrise and select Bitrise CI on the left, then select your project.

  2. Click the Workflows button on the main page.

  3. Make sure your Workflow includes the Run npm command Step.

  4. In The 'npm' command with arguments to run input variable, type install.

    Getting_started_with_React_Native_apps.png

    Using the npm ci command instead of npm install

    If you already have an up to date package-lock.json file in your project, we recommend using the ci command in The 'npm' command with arguments to run input. Using npm ci can not only result in much faster build times compared to npm install but more reliable builds as well.

Deploying your Expo projectClick to copy link

Bitrise supports Expo Application Services (EAS) for Expo projects, and the default deploy Bitrise Workflow uses the Run Expo Application Services (EAS) build Step to trigger a build on EAS.

In case you don’t want to use EAS, you can use Turtle CLI for your Bitrise Workflows. See the Expo build using Turtle CLI recipe on GitHub for details.

CodePush

You can deploy updates to your users' devices with Bitrise CodePush. CodePush is part of Release Management and it is supported for React Native and Expo apps.

For more information about CodePush, check out the official guides: CodePush.