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.
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 mails | Author | Date |
|---|---|---|
| Tom Gray | Nov 27, 05:30 | |
| Nicholas Riley | Nov 27, 06:37 | |
| Douglas Davidson | Nov 27, 18:12 |






Cocoa mail archive

