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];
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)
- iOS table view lag issue, i'm using dispatch and save cache
- Why doesn't ios system sound play in simulator?
- iOS change auto layout constraints when device rotates
- UIImagePickerController - crops picture to square (in portrait)
- Installation Failed: Invalid Argument -iOS Extension
- How to call post service with parameters swift 3.0 Alamofire 4.0?
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.
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.
Hopefully, this will help you. 🙂
- Apple Store submit fails with Error ITMS-90046, but Associated Domains is not among entitlements
- Programmatically go back to previous ViewController in Swift
- NSMutableString stringByReplacingOccurrencesOfString Warning
- Where to put reusable functions in IOS Swift?
- done button only for numberpad keyboard
- Swift Framework: Umbrella header '.h' not found
- Should you set the delegate to nil in the class using the delegate or in the class itself
- Swift draw shadow to a uibezier path
- Convert observe .value to .childAdded in swift
- How to change an iOS device volume programmatically?
- Detecting the first ever run of an app
- How to record sound produced by mixer unit output (iOS Core Audio & Audio Graph)
- TestCase : SwiftHTTP library not making the HTTP call
- How can I find a number of True statements in an Array of Bools in Swift
- Take a picture on iPhone without showing controls