-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppliedSyncChangeSets.ticdsync does not save properly #55
Comments
Are you seeing any errors logged by the framework? You can turn the logging level up using
|
Also, be sure that your root context is being properly saved. TICDS won't consider a sync change set fully applied until the root context has persisted the applied changes to disk. Sent from my iPad On May 28, 2013, at 12:34 PM, jlb1234 notifications@github.com wrote:
|
There are no errors being logged by the framework, everything appears to be working properly. I resolved the issue by simply forcing the changes to be saved to self.appliedSyncChangesContext as opposed to self.unsavedAppliedSyncChangesContext (which seemed to be to be pointless in the first place). |
The unsavedAppliedSyncChangesContext is actually part of our new sync integrity changes in 1.0.2. What happens is that TICDS will store all the applied sync changes in that context after a sync and open a SyncTransaction. It will then begin listening for ManagedObjectContextDidSave notifications for all the contexts from the background syncing context all the way up to the root context of your app that is actually doing the saving. Once it has determined that the changes TICDS applied to your object graph have been persisted to disk it moves them to the appliedSyncChangesContext. Clearly something in that chain isn't working properly for you. I would check the |
Thanks for explaining more. What exactly was the rationale for this change? Does it provide performance enhancements? I've been working to improve the performance of the sync operations, and actually set up TICoreDataSync library to save the main core data store to disk after each individual sync change set is completed. |
This change was actually a reliability change. What we were finding was that once TICDS applied a change it recoded it as such right away. The problem was that if something happened to the app before the app's main core data stack could save to disc (a crash, for instance) that those changes would all be lost and, since TICDS had already recorded them as applied, it never did so again. On May 30, 2013, at 10:07 AM, jlb1234 notifications@github.com wrote:
|
I am encountering a problem where TICoreDataSync is not saving the local AppliedSyncChangeSets.ticdsync file properly. This makes it so that every time the app is loaded, it re-applies all TICoreDataSync change sets, rather than only the ones which have not yet been applied.
The text was updated successfully, but these errors were encountered: