• 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: CFBundleGetInfoString Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFBundleGetInfoString Question


  • Subject: Re: CFBundleGetInfoString Question
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 27 Nov 2002 09:12:55 -0800

On Tuesday, November 26, 2002, at 08:30 PM, Tom Gray wrote:

How can I get a hold of CFBundleGetInfoString from within my program?

I tried this:

NSDictionary *pListStrings;

pListStrings = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Info" ofType:@"pList"]];
NSLog(@"count:%i", [pListStrings count]);
NSLog([pListStrings objectForKey:@"CFBundleGetInfoString"]);

No, please don't do that. Try [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleGetInfoString"]. Or
[(NSString *)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), CFSTR("CFBundleGetInfoString")) autorelease].

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: 
 >CFBundleGetInfoString Question (From: Tom Gray <email@hidden>)

  • Prev by Date: NSPipes and NSTask, and a file descriptor leak
  • Next by Date: How to know if a modem is installed?
  • Previous by thread: Re: CFBundleGetInfoString Question
  • Next by thread: NSTextField Question
  • Index(es):
    • Date
    • Thread