iCloud: movimiento del archivo completado

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

Can you help me to move an image file from local directory to icloud with source codes -

2 Respuestas

Note: I haven't done this myself, so all the info below is purely from reading the documentation:

La 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.

respondido 08 nov., 11:15

Thank you for your reply. Do you have any idea how to use NSMetadataUbiquitousItemIsUploadedKey? Any sample code? - iOS

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.

Para detalles: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW1

respondido 25 nov., 11:19

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.