Question

Im using NSFM's method removeItemAtURL to remove some item in iCloud, though right after that i run a NSMetaDataQuery and it can still see this item for like 3 seconds. Is there a way to fix this? Im trying to upload an item to iCloud, and if file with such name exists i need to replace it, and then track NSMetaDataItem's uploadingPercentKey to show it to user, though as i said before, the item is still returns YES from valueForKey:NSMetadataUbiquitousItemIsUploadedKey like for 3 seconds after removal.

Était-ce utile?

La solution

As far as I know there is no way to speed this up. The metadata is handled separate to your app by a daemon. That could take a little while to update the metadata, and even longer to send that metadata to the cloud, and then to other devices.

I think you just have to try to design around this delay. Assume that the metadata may not be completely up to date.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top