Install Sahha SDK for Expo
This guide is for developers using Expo to run their React Native project.
The Sahha SDK can be used inside an Expo project
In order to use native platform code for Android and iOS, you will need to convert your Expo Go project to an Expo development build.
Visit the Expo documentation to learn how to create development builds.
Step 1) (Optional) Create Expo project
If you don't have an Expo project, create one.
Use the command npx create-expo-app "ProjectName".
npx create-expo-app MyExpoProject npx create-expo-app MyExpoProject
Step 2) Go to Expo project folder
Go to your project folder.
Use the command cd ProjectName.
cd MyExpoProject cd MyExpoProject
Step 3) (Optional) Install Expo modules
You can optionally add Expo to an existing React Native project.
Visit the Expo documentation to learn how to add Expo to an existing React Native project.
Use the command npx install-expo-modules@latest inside your project folder.
npx install-expo-modules@latest npx install-expo-modules@latest
Step 4) (Optional) Install Expo dev client
If you are starting a new React Native project, you will need to install the Expo dev client.
Use the command npx expo install expo-dev-client inside your project folder.
npx expo install expo-dev-client npx expo install expo-dev-client
Step 5) Install Sahha SDK
Install the Sahha SDK as an npm package.
Use the command npm i sahha-react-native inside your project folder.
npm i sahha-react-native npm i sahha-react-native
Step 6) Add the iOS platform to your project
If your app uses iOS, you will need to add the iOS platform to your project.
Use the command npx expo run:ios -d inside your project folder.
npx expo run:ios -d npx expo run:ios -d
After you've added the iOS platform to your project, follow the React Native iOS setup steps .
Step 7) Add the Android platform to your project
If your app uses Android, you will need to add the Android platform to your project.
Use the command npx expo run:android -d inside your project folder.
npx expo run:android -d npx expo run:android -d
Step 8) Browse the Sahha Expo demo app
We've provided a demo app to show how to setup the Sahha SDK inside an Expo development build.
Next Steps
Continue to Step 3.) Configure Settings to configure the Sahha SDK.
- Previous
- React Native
- Next
- Ionic Capacitor