• 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: Name to PSN
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Name to PSN


  • Subject: Re: Name to PSN
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 21 Feb 2009 12:15:36 -0600

On Feb 21, 2009, at 11:38 AM, Pierce Freeman wrote:

Thanks for your reply.

You're welcome.

I see where you're coming from regarding NSWorkspace, and it seems like a great idea! How would you recommend scanning it? A loop or something else more creative?

A loop, sure. The same way you enumerate any array. Fast enumeration if you're targeting Leopard, or using an index or NSEnumerator.



Is there some reason it is better/easier to use the bundle identifiers instead of the
name?

A bundle ID is guaranteed to be unique and stable. With a name, there may be other applications out there that are named the same thing. Also, the user is free to rename your application, although I don't know off-hand if the name provided by NSWorkspace is the on-disk name or the CFBundleName.


And I assume you would get this by sorting through NSWorkspace as well.

The bundle ID is one of the values in the dictionary elements of the array returned from -launchedApplications.


Cheers,
Ken

_______________________________________________

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: Name to PSN
      • From: Pierce Freeman <email@hidden>
References: 
 >Re: Name to PSN (From: Pierce Freeman <email@hidden>)

  • Prev by Date: Re: Name to PSN
  • Next by Date: how to listen event 'did change my data'
  • Previous by thread: Re: Name to PSN
  • Next by thread: Re: Name to PSN
  • Index(es):
    • Date
    • Thread