getting metadata for a file on iOS

  • NSMetaDataQuery on iOS only works for iCloud, this I know, however the File Metadata Search Programming Guide says the following about searching the sandbox on iOS.

    " In order to search your application’s sandbox, you will need to traverse the files within the sandbox file system recursively using the NSFileManager class. Once matching file or files is found, you can access that file in the manner that you require. You are also able to use the NSMedatataItem class to retrieve metadata for that particular file."

    I cannot however find which method allows me to use the NSMetadataItem class to retrieve metadata for a file and the guide gives no more information. You can get resource values  via NSURL, but that's not quite the same thing. Is there such a method or is the guide just wrong here?
  • On May 17, 2012, at 19:56 , Roland King wrote:

    > NSMetaDataQuery on iOS only works for iCloud, this I know, however the File Metadata Search Programming Guide says the following about searching the sandbox on iOS.
    >
    > " In order to search your application’s sandbox, you will need to traverse the files within the sandbox file system recursively using the NSFileManager class. Once matching file or files is found, you can access that file in the manner that you require. You are also able to use the NSMedatataItem class to retrieve metadata for that particular file."
    >
    > I cannot however find which method allows me to use the NSMetadataItem class to retrieve metadata for a file and the guide gives no more information. You can get resource values  via NSURL, but that's not quite the same thing. Is there such a method or is the guide just wrong here?

    I'm pretty sure it's just wrong. I tried hard to believe the statement, but couldn't find any iOS API  that would do it.
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today