Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get Apple Push Notifications with Firestore?

Is it possible to implement APNS with Firebase Firestore?

I've managed to send a push notification to devices via Firebase Cloud Messaging from the web console but my app needs to have push notifications for changes in the database, such as when the user receive a like or a friend request.

Is there any workaround?

Thanks for pointing me in the right direction.

like image 1000
Tuan Anh Vu Avatar asked Jan 28 '23 02:01

Tuan Anh Vu


2 Answers

You need to use Firebase Cloud Functions with the FireStore triggers. The first link has your use case.

There are some great tutorial videos on Firebase's YouTube account. It even includes adding a Firestore Trigger.

like image 51
James Poag Avatar answered Jan 30 '23 16:01

James Poag


You can also send device-to-device push notifications, which work great for 1-1 relationships (1-1 chat, for instance). To achieve that, you can leverage this endpoint https://fcm.googleapis.com/fcm/send.

like image 21
Dave Elson Avatar answered Jan 30 '23 17:01

Dave Elson