parse-platformsynchronizationlocal-datastore

how to sync parse with local datastore properly?


I am developing an app that uses parse. Getting the data from parse cloud is not a problem. I would like to sync the data with the user's device as well.

I am now thinking of a way how to do this properly. When I query the parse cloud, I get the data, pin them to local datastore and return them for other use. Then, if user has no internet connection, I will query the local datastore instead, but when user gets online again, I need to sync the data with the parse cloud again.

Is this approach good? Is there a better solution to this problem?

Thanks


Solution

  • Sounds like a good approach to me. At least that's what I learned a while back from the tutorial here: https://www.parse.com/tutorials/using-the-local-datastore