• 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: NSWorkspace - getting info about other applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWorkspace - getting info about other applications


  • Subject: Re: NSWorkspace - getting info about other applications
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 6 Sep 2002 18:55:23 +0200

On Friday, September 6, 2002, at 03:52 , Jeremy Dronfield wrote:

...I have several applications which share the same user defaults (and therefore the same bundle identifier).

Non sequitur. I think it is a bad design: myself, I would allocate a special shared domain for them, whilst keeping unique identifiers.

I'm building an app which acts as a central co-ordinator for these other apps, getting and displaying information about them,

Are you, incidentally, completely sure you *do* want the multi-app design?
In my experience, often (of course, not always!) in such cases one application with a rich loadable bundle-based API proves better from both programmer's and user's POV.

- Two Items ("SR1" and "SR2") from each bundle's infoDictionary;

Just create the bundle and read the dictionary.

I can't find anything in NSWorkspace that seems to fit.

That would be, I guess, since the functionality is to be found in NSBundle.
For this particular case, I guess bundleWithPath: is what you want.

The reason for this, in part, is that this application has to accommodate later applications with unpredictable names being added to the set. The only thing they will have in common will be the said bundle identifier.

Unless LaunchServices can do this for you (which I doubt, but really don't know) the proper solution IMHO is to add your own key into the Info plist,
and search apps yourself for it (with Cocoa services it is pretty easy, although I do agree that LaunchServices should do that for you automagically).

I have a workaround in mind (building each app so that it automatically deposits those infoDictionary values in the defaults file when it runs, and then working from there)

If you are satisfied with the imposed limitation that a new app has to be run at least once *before* added to the bunch, I think it is all right (but for the one change to the extra shared domain).
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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: 
 >NSWorkspace - getting info about other applications (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: Addressbook api
  • Next by Date: Re: Get parent process (Carbon question)
  • Previous by thread: Re: NSWorkspace - getting info about other applications
  • Next by thread: Printing PDF Bytes: Best Way (?)
  • Index(es):
    • Date
    • Thread