forcedotcom / SalesforceMobileSDK-ReactNative

BSD 3-Clause "New" or "Revised" License
49 stars 54 forks source link

salesforce mobile SDK documentation for Integrating for react native app push notifications #370

Closed kopposh closed 5 months ago

kopposh commented 5 months ago

I want to use the SDK to receive push notifications in an existing react native app. The app uses sales force backend. As per the documentation, we want to setup the infrastructure for push notifications including connected app. but we couldn't find how to get the device identifier and map it to users. If there is any readme of detailed documentation Please let me know.

wmathurin commented 5 months ago

You don't need the device identifier. When sending notifications, you just need to know the api name of the connected app and the user ids. For more information see: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_push_notification.htm

kopposh commented 5 months ago

Thank you for quick response. Can you please help me with the step by step documentation for integrating salesforce SDK into existing react native app. I have seen that forcereact does it by creating a new react native app, But I want to integrate into a existing app.

wmathurin commented 5 months ago

The recommended approach is to generated an application with forcereact then bring over your javascript and also npm add your other dependencies.

kopposh commented 5 months ago

But we are using a react native expo application. Is it possible to move an existing expo app into react native app created with salesforce forcereact? if we can, can you please help with any possible documentation for it.

wmathurin commented 5 months ago

We do not have documentation specifically for that use case. For "how to" question, you can also post in our trailhead community. You might get pointers from other developers in the community.