• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get all the path of an application present on the disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get all the path of an application present on the disk


  • Subject: Re: How to get all the path of an application present on the disk
  • From: Jerry Krinock <email@hidden>
  • Date: Thu, 21 Mar 2013 07:39:35 -0700

On 2013 Mar 20, at 10:57, Matt Neuburg <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: How to get all the path of an application present on the disk
      • From: Charles Srstka <email@hidden>
    • Re: How to get all the path of an application present on the disk
      • From: Ken Thomases <email@hidden>
References: 
 >Re: How to get all the path of an application present on the disk (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Global (all-user) preferences for an application
  • Next by Date: Re: Number of chars
  • Previous by thread: Re: How to get all the path of an application present on the disk
  • Next by thread: Re: How to get all the path of an application present on the disk
  • Index(es):
    • Date
    • Thread