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:
Plugin props | ||
---|---|---|
| required | Used to configure APNs environment entitlement. "development" or "production" |
Initialize Pushwoosh
See Pushwoosh React Native integration
1.4 Prebuild (optional)
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.
Why is prebuilding recommended?
Prebuilding locally can be beneficial for inspecting changes in config plugins and assisting in the debugging of issues.
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