• 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 a list of applications?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get a list of applications?


  • Subject: Re: how to get a list of applications?
  • From: petite_abeille <email@hidden>
  • Date: Fri, 12 Jul 2002 18:46:00 +0200

On Friday, July 12, 2002, at 06:09 , Diggory Laycock wrote:

I too would like to get a collection of all apps.

NSWorkspace's findApplications method does not return anything: it
seems to update private "records"

Here are some different approach you might take with Foundation:

- NSSearchPathForDirectoriesInDomains to retrieve relevant "standard" application locations (eg NSApplicationDirectory and so on). There is also an obscure NSStartSearchPathEnumeration in /usr/include/NSSystemDirectories.h (thanks to Georg Tuparev for that one :-)

- NSFileManager directoryContentsAtPath or enumeratorAtPath to enumerate their content

- NSFileManager fileAttributesAtPath and/or isExecutableFileAtPath to get more info.

If you really, really want to be double check about an "application" attribute as seen by the Finder, you can use [NSBundle bundleWithPath] and check the different infoDictionary information.

If you are adventurous, Karl (aka Hsu) also pointed out a private API in the LaunchServices framework: LSCopyAllApplicationURLs().

Good luck.

PA.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: how to get a list of applications? (From: Diggory Laycock <email@hidden>)

  • Prev by Date: Re: how to get a list of applications?
  • Next by Date: GNUStep Help
  • Previous by thread: Re: how to get a list of applications?
  • Next by thread: NSTextField not scrolling
  • Index(es):
    • Date
    • Thread