I can able to move a file from the local directory to iCloud using the condition
setUbiquitous:YES. The file has been moved successfully. If the file size is large, it takes certain time to complete moving. Is there any method to identify, if the file has completed moving to iCloud? Thanks in advance for your answers.
preguntado el 08 de noviembre de 11 a las 08:11
Note: I haven't done this myself, so all the info below is purely from reading the documentation:
NSMetadataItem class has, among others, an attribute key called
NSMetadataUbiquitousItemIsUploadedKey. Knowing this, you should be able to set up an
NSMetadataQuery that notifies you once the item has been uploaded.
You can check with NSUURL getResourceValue:forKey:error: method
NSURLUbiquitousItemIsUploadedKey—Indicates that locally made changes were successfully uploaded to the iCloud server.
NSURLUbiquitousItemIsUploadingKey—Indicates that locally made changes are being uploaded to the iCloud server now.
NSURLUbiquitousItemPercentUploadedKey—For an item being uploaded, indicates what percentage of the changes have already been uploaded to the server.