Re: CFBundleGetInfoString Question
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.