drewmccormack / ensembles

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

Ensembles not restoring the contents of iCloud data #178

Closed Spokane-Dude closed 10 years ago

Spokane-Dude commented 10 years ago

I finally got Ensembles working (it did create a CoreData store on iCloud). So to further test it, I deleted the app from the iPad, and ran the app again from the XCode 5 debugger... since the CoreData file on the iPad was deleted with the app, the app correctly reacted by creating a new CoreData store (using MagicalRecord).

However, shouldn't it have restored the contents of the CoreData store from the file on iCloud?

drewmccormack commented 10 years ago

If you leech again, if should import the cloud data. This might take a little while, because deleting an app messes quite a bit with iCloud, and it might take a while to download the data.

Spokane-Dude commented 10 years ago

OK... is there a way that I can tell programmatically when the data has been downloaded completely?

drewmccormack commented 10 years ago

The CDEICloudFileSystem class fires off a notification when a bunch of files have downloaded. It never knows if it has them all until you try a merge, and it tests all the data it has. But a good policy is to fire a merge whenever you see the notification.