Closed kunalsood closed 10 years ago
I am pretty sure that the error you are seeing is just that the iCloud files have not been downloaded yet. Ensembles will request the files when it sees the metadata, and then it is up to iCloud to download. This part can take some time, and ensembles can't influence it. It is up to iCloud.
When the metadata for an iCloud file arrives, that file will seem to be in the file system, even if it hadn't been downloaded yet.
So what is happening is that ensembles is looking at the new files, trying to import them, and failing because one or more are not downloaded yet. In general, this is not a serious failure, and you should just retry a bit later.
I am surprised you can't get the sync to work at all. What if you are really patient, wait 15 minutes, and then try again?
Have you tested with the Idiomatic test app to see if that works?
Drew
By the way, the cancelled error arises because ensembles uses a timeout to cancel file operations that take too long due to the file not yet being downloaded. We thought it was better just to fail the merge quickly and try later, rather than waiting for the download, which could take minutes or longer.
Drew
Confirmed, this was indeed the issue. Thanks for taking the time to explain this, and the improved error!!
Before I begin explaining this, I must say, I have a strong feeling that this is something I'm doing wrong.
The issue I have run into is, I'm having trouble getting a second device to do a mergeWithCompletion: successfully.
Here are the steps I've followed, several times..
CoreDataEnsembles.h
andCDEICloudFileSystem.h
into my AppDelegate.CDEPersistentStoreEnsembleDelegate
protocol.Replacing my ensemble identifier, path to my persistent store file and path to my managed object model (momd) file with appropriate strings.
and, then I add some information to manipulate the data in my core data store, and tap the button that calls mergeWithCompletion:, the console logs..
followed by the iCloud gauge showing upload activity.
Call mergeWithCompletion:
com.mentalfaculty.ensembles.clouddata
directory, theensemble identifier
directory inside it, and theevents
andstores
directories inside it, the events directory has a whole bunch of.cdeevent
files, and the stores has what appear to be plist files for every device that leeched successfully. (So, I'm guessing this means that the first device did indeed sync successfully.) I have repeated this entire procedure several times, trying with different devices in different orders, and have not yet been able to get a second device to sync up.Now, this is what
<Foundation/FoundationErrors.h>
says about 3072..As cough nice cough an explanation as that is, I'm hoping someone might be able to tell me what I could be doing wrong here.