• 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: App name from Bundle Identifier?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App name from Bundle Identifier?


  • Subject: Re: App name from Bundle Identifier?
  • From: Jonathan Hess <email@hidden>
  • Date: Fri, 12 Sep 2008 14:34:59 -0700

Hey Dave -

You could start with -[NSWorkspace absolutePathForAppBundleWithIdentifier:] to get a path. Use that path to create an NSBundle instance with +[NSBundle bundleWithPath:], and then use the NSBundle to find the name. -[NSBundle objectForInfoDictionaryKey:] and -[NSBundle localizedInfoDictionary] can be used with CFBundleName and CFBundleDisplayName depending on whether or not the application in question has a localized name. Interface Builder does not have a localized name.

Also, this note (http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html#/ /apple_ref/doc/uid/20001431-110725) seems pertinent:

Before displaying a localized name for your bundle, the Finder compares the value of this key against the actual name of your bundle in the file system. If the two names match, the Finder proceeds to display the localized name from the appropriate InfoPlist.strings file of your bundle. If the names do not match, the Finder displays the file-system name.

Good Luck -
Jon Hess

On Sep 12, 2008, at 2:06 PM, Dave DeLong wrote:

Hi everyone,

I've been looking inside NSWorkspace, NSBundle, NSApplication, NSFileWrapper, etc for some way to get the display name of an application from it's bundle identifier, but I can't find anything. Is there a way to do this? For example, if I have "com.apple.InterfaceBuilder3", I'd like to get back "Interface Builder".

Thanks,

Dave DeLong
_______________________________________________

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

_______________________________________________

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


References: 
 >App name from Bundle Identifier? (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: App name from Bundle Identifier?
  • Next by Date: Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Previous by thread: Re: App name from Bundle Identifier?
  • Next by thread: Re: App name from Bundle Identifier?
  • Index(es):
    • Date
    • Thread