In my firebase database I use persistence to cache the data, but this give me a problem, because some of my data needs to be loaded from the database when the app loads and not from tha cached data. I have a tableview where the data from the database is shown, it needs to update with the database and not look for the saved data in the tableview. Right now I am using
self.ref?.child(u.uid).observe(.value, with: { (snapshot) in
print(offersnapshot)
})
to get the data from the data from the server. But right now the app needs to restart, before the data are updated.