Is there a way to manually and immediately refresh the Firebase cache, using the iOS SDK, to pull down the latest data (assuming you are online)? For example, if I made some cha
I had the same problem with persistence and here are two options solving it:
1) Keep using observeSingleEventOfType
but setting ref.keepSynced(true)
. This won't listen to changes happening in your data but it refreshes data once this code is executed. I've chosen this option for my FAQ section which just needs to update once when the screen is opened (viewDidLoad).
2) Use observeEventOfType
. This will always keep your data in sync and will execute again as soon as your data changes.