Integrating Expo Plugin
How to integrate the Pushwoosh React Native & Expo SDK to your app for iOS and Android.
1. Install Plugin
1.1 Install the Pushwoosh Expo plugin using the Expo CLI
1.2 Install Pushwoosh React Native SDK
1.3 Configure your app.json/app.config.js.
Add the plugin to the front of the plugin array.
Plugin Prop
You can pass props to the plugin config object to configure:
Initialize Pushwoosh
See Pushwoosh React Native integration
1.4 Prebuild
Prebuilding within Expo entails the generation of native runtime code for the project, resulting in the construction of the 'ios' and 'android' directories. Through prebuilding, the native modules that utilize CocoaPods, autolinking, and other configuration plugins are automatically linked and configured. You can conceptualize prebuild as a bundler for native code.
Executing expo prebuild initiates a custom managed workflow that combines the advantages of both bare workflows and managed workflows simultaneously.
It is important to note that prebuilding is essential; without it, you might encounter a "TypeError: Cannot read property 'init' of null" error when attempting to run the app on a device.
1.5 Running
Executing the provided commands will prebuild and run your application. It's important to note that push notifications will not function in the iOS Simulator.
Last updated