Installing Expo modules
In order to use Expo modules in your app, you will need to install and configure the
expo package has a small footprint; it includes only a minimal set of packages that are needed in nearly every app and the module and autolinking infrastructure that other Expo SDK packages are built with. Once the
expo package is installed and configured in your project, you can use
expo install to add any other Expo module from the SDK.
The easiest way to get started with Expo modules is to initialize a new bare workflow project with Expo CLI:
expo init --template bare-minimum.
If you have an existing project without Expo modules installed (perhaps created with
npx react-native init), please follow the automatic or manual installation instructions below.
Aside from initializing a new project with
expo-cli, the easiest way to get up and running is with the
# Install and configure the expo package automatically
- ✅ When the command succeeds, you will be able to add any Expo module in your app! Proceed to Usage for more information.
- ❌ If the command fails, please follow the manual installation instructions. Updating code programmatically can be tricky, and if your project deviates significantly from a default React Native project, then you need to perform manual installation and adapt the instructions here to your codebase.
The following instructions apply to installing the latest version of Expo modules in React Native 0.68.
Once installation is complete, apply the changes from the following diffs to configure Expo modules in your project. This is expected to take about five minutes, and you may need to adapt it slightly depending on how customized your project is.
Save all of your changes. In Xcode, update the iOS Deployment Target under
Target → Build Settings → Deployment to
iOS 12.0. The last step is to install the project's CocoaPods again in order to pull in Expo modules that are detected by
use_expo_modules! directive that we added to the
# Install pods
# Alternatively, the run command will install them for you
You can verify that installation was successful by logging a value from expo-constants
expo install expo-constants
, then run
import Constants from 'expo-constants';
package is installed and configured in your project, you can use
to add any other Expo module from the SDK. Learn more in "Using Libraries"
The following Expo modules are brought in as dependencies of the
- expo-application - Generates the installation id in remote logging in development. This module is optional and can be safely removed if you do not use
expo-file-system and provides a common foundation for assets across all Expo modules.
- expo-constants - Provides access to the manifest.
- expo-file-system - Interact with the device file system. Used by
expo-asset and many other Expo modules. Commonly used directly by developers in application code.
- expo-font - Load fonts at runtime. This module is optional and can be safely removed, however; it is recommended if you use
expo-dev-client for development and it is required by
- expo-keep-awake - Prevents your device from going to sleep while developing your app. This module is optional and can be safely removed.
If you need to exclude Expo modules that you are not using but they got installed by other dependencies, you can use the
expo.autolinking field in package.json:
You can also exclude a specific platform by using
exclude under the platform key: