iphone - How do you detect when a file is changed in iCloud? -


when file changed in icloud (whether added, deleted, or content changed), call method created ([self methodname]) can update table view names of new files. how notified of file change? need listen nsnotification (if so, it?) or have check manually? thanks.

the name of nsnotification have listen nsmetadataquerydidupdatenotification. how did it:

[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(querydidupdate:) name:nsmetadataquerydidupdatenotification object:query];  ...  -(void)querydidupdate:(nsnotification *)notification {      //something changed, reload (nsmetadataquery, create nspredicate, rerun query, etc.)  } 

Comments

Popular posts from this blog

Glib GIOChannel -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -

python - Obscure curses error message when creating a sub window -