To track file changes in my iCloud container, I signed up for
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(processiCloudUpdates:) name:NSMetadataQueryDidUpdateNotification object:nil];
Ideally, whenever I get a message that updates have been made, I would like to open each of my UIDocs and check if the settings have been changed. It would be nice if NSMetadataQueryDidUpdateNotification was called only once. However, it starts several times (I didnโt forget removeObserver , etc. And I executed several instances), and therefore it would be extremely impractical to download all the files every time the update notification is fired (if I had 5 files , and this is called 4 times, I would quickly open 20 UIDocs). For example, this happens if I update one file (and only have one file in my ubiquitous container):
2012-07-05 10:51:39.565 Meernotes[7842:707] ... NSMetadataQuery update 2012-07-05 10:51:42.468 Meernotes[7842:707] ... NSMetadataQuery update 2012-07-05 10:51:45.216 Meernotes[7842:707] ... NSMetadataQuery update 2012-07-05 10:51:47.036 Meernotes[7842:707] ... NSMetadataQuery update
Is there any other way to determine when a file has changed? NSFileVersion did not help either.
source share