We are developing a simple app which will be using the parse's local datastore feature. We basically want the app to store and fetch the data using the local datastore primarily and then update the latest data to the cloud. To us it seems that we can achieve this if we pin our objects and then call saveEventually on them. This should save them in the local database forever until we manually unpin them. Is this approach correct or is there a better approach?
1
votes
1 Answers
0
votes
Here's what i have done in my project. Firstly, i used PFQuery to query objects and added a condition to check for internet connection. If theres no internet connection, I am querying objects from local datastore. Else, if device is connected to internet, I am fetching object from cloud. I saved the changes accordingly too.