drewmccormack / ensembles

A synchronization framework for Core Data.
MIT License
1.63k stars 131 forks source link

Forced Deleech #169

Closed asciiz closed 10 years ago

asciiz commented 10 years ago

Ensembles v2, Dropbox

"Store did deleech with error: Some left over, incomplete data has been found. Probably due to a crash."

I am getting this quite often. However, the app has been terminated normally. No crash, and it seems that Ensembles has completed all tasks.

I don't sync when the app quits, because this could be a lengthly task (slow connection, many records).

Should I call processPendingChangesWithCompletion: and/or cancelMergeWithCompletion: in applicationShouldTerminate: to prevent this issue?

drewmccormack commented 10 years ago

You don't need to call the process... method necessarily, though you could. Another approach would be to simply make sure you get a background task id from the UIApplication when you start a leech or merge, and release it in the completion. That way, the app should not get killed half way.