I'm writing a small utility app that needs to query the contents of the Applications folder. I need to ascertain which versions of certain Adobe apps are installed before finding out what plugins are present.
I'm trying to use the Spotlight APIs to do most of the heavy lifting. I construct the following predicate and set it as the predicate for an NSMetaDataQuery object.
"(kMDItemKind == 'Application') && (kMDItemFSName == '*Adobe*')"
I get meaningful results when I just use the first half of the predicate, but no results when I add the second half.
However, if I take the above predicate and use it with mdfind in a Terminal window, I get meaningful results.
Any ideas?
System - 10.6.2 on MacBook Pro 2.33 GHz
XCode 3.2.1
I'm trying to use the Spotlight APIs to do most of the heavy lifting. I construct the following predicate and set it as the predicate for an NSMetaDataQuery object.
"(kMDItemKind == 'Application') && (kMDItemFSName == '*Adobe*')"
I get meaningful results when I just use the first half of the predicate, but no results when I add the second half.
However, if I take the above predicate and use it with mdfind in a Terminal window, I get meaningful results.
Any ideas?
System - 10.6.2 on MacBook Pro 2.33 GHz
XCode 3.2.1