Friday 22 February 2019

Realtime chat iOS demo (2) - Firebase Remote Config

In the previous chapter, I demonstrated how Firebase Realtime Database can help to implement realtime chat functionality. Now imaging I am the host of the Tarot Room, I want to shut down the room at some point in time and deliver a message to inform guests of the reason and shut down period.

Considering a normal way to achieve the above goal, I definitely need backend API and deploy backend changes when I decide to open/close the room again. Firebase Remote Config will make it much easier.






Main steps to integrate Firebase Remote Config into the demo
  • Install Firebase/Core and Firebase/RemoteConfig
  • Add parameters through Remote Config panel in Firebase console
  • Click Publish Changes
  • Create RemoteConfigService




  • Call fetchRemoteValues in Login page and show the message when isShutdown is true
  • Try change parameters in Firebase console, the app should behave differently as expected if everything is correct.

There is a famous discussion around remote config loading strategies which covers the cache period and refresh mechanism.  https://firebase.googleblog.com/2017/01/firebase-remote-config-loading.html


No comments:

Post a Comment