1 Reply
      Latest reply on Nov 21, 2016 1:20 AM by eskimo
      piegreb Level 1 Level 1 (0 points)


        I am logging all the attributes of my file with the following code:


        MDItemRef item = MDItemCreate(NULL, (__bridge CFStringRef)path);
        CFArrayRef attributeNames = MDItemCopyAttributeNames(item);
        NSDictionary* attributes = CFBridgingRelease(MDItemCopyAttributes(item, attributeNames));
        for(NSDictionary *key in attributes) {
          NSLog(@"[%@] = %@", key, [attributes objectForKey:key]);


        When I do the same with mdimport -d3 "path" I get the same properties but kMDItemTextContent. I tried calling MDItemCopyAttribute directly with that property and it returns nil. How do I get this property programmatically?