Sorix / CloudCore

Framework that enables syncing between iCloud (CloudKit) and Core Data
MIT License
153 stars 40 forks source link

BUG: Adding item from an offline device, cause records duplication on other synchronized device #50

Open eugeniobaglieri opened 5 years ago

eugeniobaglieri commented 5 years ago

i was checking if this framework is good from my needs, so I began some test with the example project. I started the app on two real devices, an iPhone and an iPad, added and deleted some record and all seems work fine. On the last test i put the iPhone in flight mode, added some record and quit from app, after that I reenabled connectivity and launched app. The iPad updated consequently but all records where doubled!. After that the sync did not work anymore as expected.

I think is a bug, because is replicable every time.

deeje commented 5 years ago

yep, current implementation only catches willSave/didSave Core Data notifications and attempts to push changes to CloudKit immediately. I'm working on a branch that uses NSPersistentHistory to push changes only when online.