@batch.com/react-native-plugin

Batch Logo

Batch React-Native Plugin

The Batch React-Native Plugin allows you to build meaningful communication experience in your Android/iOS app through highly personalized push notifications & In-App messages.

Our 📕 setup documentation details the steps to take for an easy and successful integration.

Prerequisites

As this plugin is built over Batch's Native SDKs, their respective Android and iOS requirements apply.

Documentation

  • Setup guide: start your implementation here!
  • Help center: answers to most questions you may have during the integration
  • API reference: this documents each of the classes and methods in the Batch React-Native Plugin

React Native architecture

Batch ships a TurboModule implementation for the React Native New Architecture. Starting with v12.0.0, the legacy bridge has been removed and the plugin now requires the New Architecture to be enabled.

You may also find this guide useful to review after integration to make sure you're ready to go live: How can I test the integration on iOS? / How can I test the integration on Android?

Swift Package Manager (iOS, experimental)

The plugin supports React Native's experimental Swift Package Manager integration, for iOS apps that use npx react-native spm instead of CocoaPods.

The plugin ships a self-managed ios/Package.swift, so no manual scaffolding is required. Install the plugin, then run your app's usual SPM setup:

npm install @batch.com/react-native-plugin
npx react-native spm # regenerates the SPM autolinking graph

ios/Package.swift wires the native Batch iOS SDK as a Swift package dependency.

Releases

Release instructions are detailed in RELEASING.md.

Building

Build instructions are detailed in BUILDING.md.

Contributing

Please refer to our contributing guidelines.

Credits

Batch-React-Native-Plugin is based on bamlab's React Native plugin.