When using the Pushwoosh React Native plugin alongside another push notification library (such as @react-native-community/push-notification-ios) in the same iOS application, conflicts can arise. This is often because both libraries attempt to manage the UNUserNotificationCenterDelegate, which can lead to issues like local notifications not firing or push tokens not being registered correctly.
To resolve this and allow both plugins to coexist, you need to add a specific flag to your iOS project's Info.plist file.
iOS Resolution
- Open your iOS project in Xcode.
- Locate and open the
Info.plistfile. - Add the following key-value pair. This enables the Pushwoosh SDK to correctly chain notification handling calls, ensuring that events are passed to other listeners.
<key>Pushwoosh_PLUGIN_NOTIFICATION_HANDLER</key>
<true/>
This setting is typically sufficient to resolve conflicts in a React Native environment.
Note for Android
If you are using multiple push providers on Android, they may also interfere with each other's FirebaseMessagingService. You can manage this by setting a priority for the services in your AndroidManifest.xml. For more details, please see our guide on handling multiple FCM services.
Comments
0 comments
Please sign in to leave a comment.