Universal Modules and ExpoKit
ExpoKit is deprecated and is no longer supported after SDK 38. If you need to make customizations to your Expo project, we recommend using the bare workflow
Universal Modules are pieces of the Expo SDK with some special properties:
- They are optional; you can remove them from your ExpoKit build if you don't need their native code.
- They can run as standalone libraries without Expo.
Not all Expo SDK modules are Universal Modules. Right now, only a small part of our SDK has this property. We're continually expanding the number of our APIs that are available as universal modules.
When you create an ExpoKit project
, we automatically add most of the same native APIs that are available in the Expo Go app. Each of these APIs is supported by some native code which increases the size of your native binary.
You can remove any Expo Universal Module from your ExpoKit project if you don't think you need it. This means it will no longer be available in your native binary; if you write some JS which tries to import this API, you might cause a fatal error in your app. If you send an update
to your app which contains API calls that aren't present in your native binary, you might cause a fatal error.
Omitting Universal Modules is currently supported on iOS but not Android.
If you aren't sure what this guide is for or whether you need this, you are probably better off just leaving it alone. Otherwise you risk causing crashes in your app by ripping out needed APIs.
To omit a Universal Module from your iOS ExpoKit project, remove the respective dependency from
ios/Podfile. Then re-run
npx pod-install and rebuild your native code.
- GL (
- SMS composer (
- Accelerometer, DeviceMotion, Gyroscope, Magnetometer, Pedometer (
Some modules implement core Expo functionality through a generic interface. For example, our
Permissions module implements
expo-permissions-interface. If you remove the Permissions module, the project will build, but it may not run unless you add some other code which provides Expo Permissions functionality.
- Camera (
- Constants (
- FileSystem (
- Permissions (
Omitting Universal Modules is not currently supported on Android.
A few Expo modules are not included by default in ExpoKit iOS projects, nor in Standalone iOS Apps produced by
expo build. Typically this is either because they add a disproportionate amount of bloat to the binary, or because they include APIs that are governed by extra Apple review guidelines. Right now those modules are:
- FaceDetector (
If you want to use any of these modules in your Expo iOS app, you need to eject to ExpoKit rather than using
expo build. (It's on our roadmap to improve this.)
To add FaceDetector:
expo-face-detector to package.json and install JS dependencies.
pod 'EXFaceDetector', path: '../node_modules/expo-face-detector/ios' to your
, add the respective subspec
dependency in your
, and re-run