Parse. Keep LocalDataStore data sync

I’m query the data online first(without “[query fromLocalDatastore];”).
And “pin’ it for local usage.
To save bandwidth, i’m using “UpdatedAt” to get only the new stuff.

After, I query using “[query fromLocalDatastore];

  • Xcode6 error: “No matching provisioning profiles found for application”
  • Dismiss all UIAlertControllers currently presented
  • How to inform the parent viewcontroller about the changed screen orientation in the modal view controller?
  • Is it possible to generate Enterprise/In house Provisioning Profile of a wildcard AppID?
  • Get “No keychain available” error when try to access keychain from app extension
  • Error when dismissing view controller
  • it work great to get datas. 🙂

    But the question was: How to sync my local datas with data that are deleted from the Parse dashboard?

    Exemple: Getting new stuff can return zero element, But, maybe they are 10 element deleted online.

    Edit: The final goal was to have 10000 rows In parse dashboard. And grab only updated or deleted(instead of all stuff)

    2 Solutions Collect From Internet About “Parse. Keep LocalDataStore data sync”

    In this case, I would suggest to not use a physical delete but a logical delete. Add a new Boolean column called “deleted”, when you query from the device you’ll get all the data and if something has been deleted, you’ll know it.

    You should also use a second column called “sync” to indicate that the deleted row has been updated locally and then use a background job (periodicity depends on your needs) to physically delete those rows. I think this action is important in order to safely clean your database. If you leave all your deleted rows in your database, at some point your queries might get affected in terms of speed.

    I hope it helps.

    Javier.

    Please refer these links, These links bind parse.com webservices (bind parse classes) with local data(core data) and you can update local data with insertion and deletion of parse.com database classes records.

    http://www.raywenderlich.com/15916/how-to-synchronize-core-data-with-a-web-service-part-1

    http://www.raywenderlich.com/17927/how-to-synchronize-core-data-with-a-web-service-part-2

    Hopefully, this will help you. 🙂