Expo Integration
React-Native 0.60+ and Expo 43+ are requires.
The Batch React-Native Plugin can be integrated with Expo in bare and managed workflow, but it cannot be used thought the Expo Go app because this last doesn't support custom native code.
Installation
Start installing the Batch React-Native plugin with the package manager of your choice:
Then add the plugin to your app configuration file :
Additional Android steps
Copy your google-services.json
file at the root of your project (get it from the Firebase Console) and link it in your app configuration file.
Create or adapt the react-native.config.js
file at the root of your project:
Enable push notifications
Add the following in your app code, ideally the first view a user sees when opening the app:
Build and run locally
Once the plugin is installed you will need to run the expo prebuild --clean
command to rebuild the app with the plugin changes.
Then you can run your application with expo run:android
or expo run:ios
.
Build with EAS
When you are ready to go to production or to provide a new development client (for internal testing) containing your newly added custom native code: build your app with custom native code with EAS
You will have to register every iOS device you plan on testing on with eas device:create
(it has to be done before the build)
Last updated
Was this helpful?