Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending Push Notifications When a Firebase Real Time Database Node is Updated

I have created an app which uses firebase real-time database and storage. My app allows users to message each other, but I am not sure how to notify the user when they have received a new message. I store all of the messages in one node called messages. I then store the message relationships in a different node called "user-messages". How do I monitor the "user-messages" node to alert the user with a notification that they have a new message? I am familiar with observing event types and such, i.e.: .Value and .ChildAdded, but I am not sure how to trigger an event to send the user a notification.

edit: gave a little more clairity.

like image 919
Taylor Simpson Avatar asked Aug 03 '16 06:08

Taylor Simpson


1 Answers

So I accidently did not see that Firebase can use Google Cloud Messaging which seems to be able to do what I want. For future reference firebase has put the IOS setup here :Firebase Cloud Messaging SetUp

like image 106
Taylor Simpson Avatar answered Sep 19 '22 06:09

Taylor Simpson