Reputation: 41
I want to send push notification to specific user in Expo with Firebase Cloud Messaging but expo does not support firebase !!! please can you help me !!!
Upvotes: 2
Views: 6740
Reputation: 41
Fierbase / messaging not working with expo managed, you can use expo barflow and link the modules and unfortunately this featcher not work in expo go or builds using expo, you have start stand alone app using ios and android approach,
So you can use expo push notifications instead and use your api to save and push notification using expo api 2, follow documents for more info.
Upvotes: 0
Reputation: 623
If you are using Expo, you need to use Expo Push Tokens to send push notifications. You won't be able to use Firebase Cloud Messaging or any Firebase tokens.
The best way is to create a database and store all your users expo tokens. Then, you can create a cloud function to send the notifications to theses users, using Expo servers.
Here is an example : https://github.com/nathvarun/React-Native-Firebase-Tutorials/tree/master/Project%20Files/6%20Push%20Notifications
Upvotes: 3