I am looking for a simple way to detect if a document has been uploaded or modified in iCloud.
The solution I have found for the moment is to poll at given interval the /private/var/Mobile Doc… folder relative to the application and containing iCloud docs, and see if a new document has a recent modified date.
It basically works, but I would like to know if there is some kind of NSNotification, as it is for example in CoreData+iCloud, or if there are other ways I don’t know.
Thanks.
A NSMetaDataQuery might be what you are looking for. Have a look at the Standford iOS videos (available at iTunes U). The NSMetaDataQuery is used in the Core Data and iCloud-Sessions to monitor the content of an iCloud directory for changes.