• 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: Reverse of fullPathForApplication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reverse of fullPathForApplication


  • Subject: Re: Reverse of fullPathForApplication
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 9 Jul 2004 11:55:42 -0700

On Jul 9, 2004, at 11:24 AM, Audun Wilhelmsen wrote:

Try openening the Info.plist file in Application.app/Contents/, then
read the CFBundleName string.

Example code:
NSDictionary *infoList = [NSDictionary dictionaryWithContentsOfFile:
@"/Applications/iTunes.app/Contents/Info.plist"];
NSLog(@"Application name of iTunes: %@", [infoList objectForKey:
@"CFBundleName"]);

You really should use NSBundle or CFBundle to get the info dictionary rather than hard-coding something like "Contents/Info.plist". There are a variety of recognized bundle formats, each of which has a different location for it.

Douglas Davidson
_______________________________________________
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: 
 >Reverse of fullPathForApplication (From: Glen Low <email@hidden>)
 >Re: Reverse of fullPathForApplication (From: Audun Wilhelmsen <email@hidden>)

  • Prev by Date: Re: split view
  • Next by Date: Re: No Dock icon
  • Previous by thread: Re: Reverse of fullPathForApplication
  • Next by thread: a list with a popup menu?
  • Index(es):
    • Date
    • Thread