https://github.com/batchlabs/batch-reactnative-plugin-sample
Sample app for Batch's React Native Plugin
https://github.com/batchlabs/batch-reactnative-plugin-sample
batch react-native sample
Last synced: 8 months ago
JSON representation
Sample app for Batch's React Native Plugin
- Host: GitHub
- URL: https://github.com/batchlabs/batch-reactnative-plugin-sample
- Owner: BatchLabs
- Created: 2021-11-08T15:33:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-09-18T13:09:47.000Z (9 months ago)
- Last Synced: 2025-09-29T23:55:35.554Z (9 months ago)
- Topics: batch, react-native, sample
- Language: TypeScript
- Homepage:
- Size: 3 MB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README

# Batch React-Native Sample
Sample project using [Batch.com](https://batch.com/) platform built with react-native framework.
## Getting Started
### Prerequisites
- Install Node & Watchman
- Install Android Studio and platform dependencies
- Install Xcode and platform dependencies
For more information, please follow the react-native [documentation](https://reactnative.dev/docs/environment-setup)
This sample run on:
- React 17.0.2
- React-native 0.66.2
- Node : 16.2.0
### Installing
1. Run `npm install` from the project root and install the dependencies:
```
npm install
```
2. Install iOS native dependencies with cocoapods from the ios folder :
```
cd ios
pod install
```
## Setting up your APIKey
- On iOS, look for your `Info.plist` and add the following:
```bash
BatchAPIKey
YOUR_BATCH_API_KEY
````
- On Android, open `android/app/build.gradle` and add:
```groovy
defaultConfig {
...
resValue "string", "BATCH_API_KEY", "YOUR_BATCH_API_KEY"
}
```
## Add you Firebase config
Add the `google-services.json` file to `/android/app`
## Run
If you previously installed a global `react-native-cli` package, please remove it and use the built-in command line interface.
You can run the app on simulator using the react-native commands:
For iOS:
```
npx react-native run-ios
```
For Android:
```
npx react-native run-android
```
Or you can run it on a real device using Xcode or Android Studio (strongly recommended).
## Built With
* [React-Native](https://reactnative.dev/docs/getting-started) - The cross-platform framework used
* [Batch React-Native Plugin](https://doc.batch.com/react-native/sdk-integration) - Batch push provider