Configure Push Notifications for a React Native App
This is a step-by-step overview of the organization specific configuration required to enable push notifications on React Native iOS and Android. Some of the specific steps will apply to integrating the native SDKs for those platforms as well.
Required libraries for push notification support on React Native
This guide will not cover integrating the libraries required for push notification support on React Native, instead we start with a template that includes this app level configuration. If you wish to integrate these libraries into a pre-existing app, follow the instructions for each library.
- react-native-push-notification
- react-native-community/push-notification-ios
- react-native-permissions
You may also use alternative libraries, so long as they expose the required device token and push notification callbacks needed to register for and display notifications.
Prerequisites
Before getting started with this guide, make sure you have fulfilled the following requirements:
- Complete the environment setup for the React Native CLI.
- Have an actual iOS device that is set up for development with Xcode and your development team. (Note: Push notifications cannot be tested on a simulator.)
- Have an Android emulator or device setup.
- Admin permission in your Apple developer portal.
- Access to the workbench.
- A valid JWT token with the public key added to the workbench. Refer to authentication in the documentation for more information.