1

In doing an NSMetadataQuery, I'm getting results back and I'm getting the file paths but NSMetadataItemFSCreationDateKey is always null. For example:

    for (NSMetadataItem * result in sortedResults) {
      NSLog(@"Going through results");
      NSDate *theDate = [result valueForAttribute:NSMetadataItemFSCreationDateKey];
      NSURL * fileURL = [result valueForAttribute:NSMetadataItemURLKey];
    }

If I breakpoint the above code, fileURL is set properly but theDate is always nil.

I'm testing this on iOS 6.

tharris
  • 2,192
  • 2
  • 13
  • 14
  • 1
    Also, NSMetadataItemFSContentChangeDateKey works, so until I've figured this out I'll use this to sort my results. Really strange why CreationDate is empty. – tharris Sep 28 '12 at 03:18

0 Answers0