React Native Push Notifications

Hi all,

I have a react-native (ios) application that currently utilizes OneSignal for all notifications. My in-house messaging system is rudimentary at best, so I have replaced it with Sendbird. The only thing I am now struggling with is configuring the push notifications.

Appropriate certificates have been uploaded to the dashboard, and members all look to be registering/messaging appropriately. Following the steps found here Push notifications | Chat JavaScript SDK | Sendbird Docs, I see the APNS token is retrieved through firebase and then registered with the user.

Is there a way to do this without firebase? I attempted to use the token I receive from OneSignal, but SendBird tells me it’s a bad token when attempting to test a notification from the dashboard, though I was (previously) under the impression that each application on an ios device had a uniquely generated push token.

Would greatly appreciate any help or direction on the most efficient way to integrate this SDK (namely its notification services) alongside OneSignal into my existing app.

Hi @tmacon,

Currently, for ReactNative apps notifications are only available through Firebase. I am not familiar with OneSignal push SDK but I am guessing they provide push services for the push which are generated and processed through their dashboard. For chat push to work for Sendbird, you will need to implement steps mention here Push notifications | Chat JavaScript SDK | Sendbird Docs

Once that’s done, any time a push has been received by the device, it will first need to be checked for push origin, Meaning a check to see if push has been sent by OneSignal or SendBird by a simple condition on : const unsubscribe = messaging().onMessage(async remoteMessage => {}

remoteMessage property contains all of the information about the message sent to the device from FCM, including any custom data (via the data property) and notification data. Using remoteMessage you can check where push has been sent from and pass a message to OneSignal SDK or SendBirdSDK for notification to display.

You are correct, push tokens are uniquely generated for the app but once the app is uninstalled and reinstalled it will generate a new push token for that app.

Let us know if you have any further questions.