When using Firebase in an iOS app I would want to give the users the option to sync their data into the Firebase cloud or just keep everything local. I've seen that Firebase has introduced the option in their SDK to go offline and keep the data from syncing online but I'm not sure about the intent of the feature.
//Keep data local.
[Firebase defaultConfig].persistenceEnabled = YES;
self.firebase = [[Firebase alloc] initWithUrl:kFirechatNS];
[Firebase goOffline];
From the documentation it seems that the goOffline(), and offline mode in general, is build to handle temporary periods where the device is offline, and sync data back in to the cloud as soon as the device becomes online again. Would the Firebase offline mode be capable of handling a "permanent offline" scenario? Or would forcing Firebase to go "permanently offline" lead firebase to just accumulate more and more "meta data" for a never occurring future sync to the cloud? Or discard old data at some point? Or run out of offline cache disk space when a max cache size is reached ?
I got answer from Firebase support:
While you can use goOffline() to force the client offline for a long time, performance will deteriorate over time. The Firebase clients will queue intermediate state changes, instead of updating the stored state as the server does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With