On 2013 Mar 20, at 10:57, Matt Neuburg <m...@tidbits.com> wrote:

> I recently broke my own app … by turning off Spotlight!

Nice, Matt!   Yes, Spotlight is great - when it works - but I've always felt 
that it was a tad presumptuous of Apple to provide an API for *developing* with 
it.  It's fuzzy even when it's *on*.

To the original question, I don't think there's an easy way to do this.  I 
don't think Launch Services remembers any more than the most 
recently-recognized version.

The only way to do this may be to search the whole drive, stopping each time 
you find a directory (package) which looks like an app (.app extension, 
presence of Contents/Info.plist, etc.), and examining the CFBundleIdentifier in 
that Info.plist.

It can be done using PBCatalogSearchAsync(), as in these demos…

https://github.com/jerrykrinock/ClassesObjC/blob/master/SSYCarbonSearcher.m
https://github.com/jerrykrinock/SSYCarbonSearcher

but such a search takes minutes, not seconds, especially for a large non-SSD 
mechanical drive.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to