Using Expo SDK in Bare React Native Apps
Install Superwall's Expo SDK in existing React Native projects without Expo
This guide is for React Native developers who want to integrate Superwall for the first time using our Expo SDK, even though their project doesn't use Expo.
This doesn't sound like you?
- Expo project → Use the standard installation guide
- React Native app with existing Superwall SDK → See our migration guide
What are Expo Modules?
Expo Modules allow you to use Expo SDK packages in any React Native project, even if you're not using Expo as your development framework. This means bare React Native apps can benefit from Expo's ecosystem while maintaining their existing project structure.
Superwall's Expo SDK (expo-superwall
) is now our recommended SDK for all React Native projects. By installing Expo Modules in your bare React Native app, you can use our latest SDK with the best features and support.
Prerequisites
Before starting, ensure you have:
- A React Native project (compatible with React Native 0.79+)
- iOS deployment target set to 15.1 or higher
- Android minimum SDK version 21 or higher
- Node.js 18 or newer
Step 1: Install Expo Modules
First, you need to install Expo modules in your React Native project. This allows you to use any Expo SDK package, including expo-superwall
.
For comprehensive installation details, refer to Expo's official guide
Automatic Installation (Recommended)
Run the following command in your project root:
npx install-expo-modules@latest
This command automatically configures your iOS and Android projects to support Expo modules.
Manual Installation (If Automatic Fails)
If the automatic installation doesn't work (common in highly customized projects), follow these steps:
- Install the expo package:
npm install expo
-
Configure your iOS project:
- Set iOS deployment target to 15.1 in Xcode
- Update your
AppDelegate
files as per Expo's manual instructions - Run
npx pod-install
to install iOS dependencies
-
Configure your Android project:
- Update
android/settings.gradle
andandroid/app/build.gradle
- Follow the Android configuration steps in Expo's guide
- Update
Step 2: Install Superwall Expo SDK
Once Expo modules are configured, install the Superwall SDK:
npm install expo-superwall
Step 3: Platform-Specific Configuration
iOS Configuration
After installing the SDK, run:
cd ios && pod install
Android Configuration
Ensure your android/app/build.gradle
has:
android {
compileSdkVersion 34
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
}
}
Troubleshooting
If you encounter any issues during installation, refer to Expo's installation guide for detailed troubleshooting steps and platform-specific configuration details.
What's Next?
Continue with the Superwall configuration guide to complete your setup.
How is this guide?