I have code that detects iCloud availability, generates the file and uses the FileManager to send it to the cloud. Files then remain local, until IOS uploads it to the cloud.
Is there a way to detect when the file actually gets uploaded?
Using NSMetaDataQuery
you can obtain status information for all your iCloud files. The NSMetaDataItem
returned for each file consists of key/value pairs and contains useful information such as NSMetadataUbiquitousItemIsUploadedKey
, NSMetadataUbiquitousItemIsUploadingKey
, NSMetadataUbiquitousItemUploadingErrorKey
and NSMetadataUbiquitousItemPercentUploadedKey
.