Skip navigation.
 
mlRe: CFBundleGetInfoString Question
FROM : Douglas Davidson
DATE : Wed Nov 27 18:12:55 2002

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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlCFBundleGetInfoString Question Tom Gray Nov 27, 05:30
mlRe: CFBundleGetInfoString Question Nicholas Riley Nov 27, 06:37
mlRe: CFBundleGetInfoString Question Douglas Davidson Nov 27, 18:12