Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger Notification in iOS upon change in Firebase Database

I'm using FirebaseUI to populate a table from the Database, hence, it also listens to changes, e.g. when a child is added, it automatically gets inserted into the table.

Now I'm trying to implement a notification upon that exact even, meaning when there is a new child added to the DB, there should be a notification that a new child has been added.

What is the best practice to do so?

I'm aware that there are Remote Push Notifications (what Firebase offers through its console), but this here is something else right? I guess there is a way in which the app itself notifies the user when a new child is added, but what happens when the app is closed?

like image 941
ffritz Avatar asked Apr 25 '26 06:04

ffritz


2 Answers

With the new feature Cloud Functions, you can do this without any need of an external server.

See my response there for more details : Firebase notification on child added/modified

like image 61
Valentin Avatar answered Apr 27 '26 20:04

Valentin


You're looking for Firebase Cloud Messaging, which is what Firebase Notifications is built on top of. Note that you will need an app server to run the code that listens for the changes to the database and then calls FCM to send the notification to the user.

like image 26
Frank van Puffelen Avatar answered Apr 27 '26 18:04

Frank van Puffelen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!