Rafael Lima
Rafael Lima

Reputation: 3535

Firebase Remote Config Force Refresh on Update

I recently added Firebase remote config to my project in order to manage some app settings remotely.

Due the nature of Firebase, the configs can only be updated on client side every 12 hours. And as I added the variables to the remote config slowly, I accidentaly created the following scenario:

  1. User has version A of the app with few variables on remote config.
  2. App updates variables from firebase
  3. User updates app version to A+1 which has new variables on remote config
  4. App tries to update variables from firebase but is denied due to short request interval.
  5. App is running with the new variables all set to "" until firebase allows remote config update

Is there any way to force Firebase to update the remote config fields on update?

Upvotes: 0

Views: 4466

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317828

If you want to notify app client of changes in Remote Config, the documentation describes a solution that you can implement. It involves:

  1. Subscribing the app to an FCM topic
  2. Sending a message to that topic automatically with cloud functions
  3. Marking old data as stale
  4. Refreshing the config on app startup

Upvotes: 1

Related Questions