Home > Enterprise >  Is there a way to detect when the Firebase Remote Config sends new data to my app?
Is there a way to detect when the Firebase Remote Config sends new data to my app?

Time:05-01

I have an app where I'm using Firebase Remote Config to fetch things from my server. My app fetches every day, but the content that I have only changes around every month. Is there a way to detect when my Remote Config actually sends new data, versus just fetching what there was before? I have looked into using UserDefaults to save the previous data and compare it but I'm not quite sure how that would work. Is there a way, using Firebase, to send a notification to my app that new data has been published?

CodePudding user response:

There is no built-in solution for this. You will have to build something yourself.

You can use Cloud Functions to write a Remote Config trigger that, when your configuration changes, uses Firebase Cloud Messaging to notify your app that it should force a reload the config without polling.

This blog goes over the process in more detail.

  • Related