drewmccormack / ensembles

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

CDEICloudFileSystemDidDownloadFilesNotification not firing #101

Closed fdstevex closed 10 years ago

fdstevex commented 10 years ago

The CDEICloudFileSystemDidDownloadFilesNotification notification, which is intended to tell a client application that there is new data available to sync, is not firing.

initiateDownloads: in CDEICloudFileSystem is called when a new file appears, and it looks like is expecting to be called once the download is complete, but this doesn't happen. After the call to startDownloadingUbiquitousItemAtURL there are no further calls to initiateDownloads: for the file that just appeared in iCloud (i.e., it's not called when the download completes).

drewmccormack commented 10 years ago

Fixed in fd8dc681f29a328f8e15ca182de8f259e1d714e2

fdstevex commented 10 years ago

This is still happening for me. I believe the only reliable way to determine when a download is complete is through an NSFileCoordinator, as neither of the metadata query delegate methods is firing when the download is complete. I'll send you a pull request with some code that's working for me.

ylin commented 9 years ago

I am also noticing that this is still happening for me, I get the notifications sometimes, but most of the time it is not fired.

drewmccormack commented 9 years ago

Unfortunately there is not that much we can do. We rely on the metadata notifications, and they don't always fire. You should just make sure there are backups, like a timer every few minutes, or syncing when the app becomes active.

Kind regards, Drew

On 08 Jan 2015, at 07:42, Yi Lin notifications@github.com wrote:

I am also noticing that this is still happening for me, I get the notifications sometimes, but most of the time it is not fired.

— Reply to this email directly or view it on GitHub.

ylin commented 9 years ago

Yes, but with further testing, it's not as bad as I initially thought. Most of the time it does fire.