How can this be achieved? I would like to get the name so i can display it within an app, without having to change it in code each time i change a name, of course.
+9
A:
Try this
NSBundle *bundle = [NSBundle mainBundle];
NSDictionary *info = [bundle infoDictionary];
NSString *prodName = [info objectForKey:@"CFBundleDisplayName"];
epatel
2009-08-07 21:54:04
sweetness, thanks!
Edward An
2009-08-08 00:20:52
A:
I had a problem when I localize my application name by using InfoPlist.strings, like
CFBundleDisplayName = "My Localized App Name";
I could not obtain localized application name if I use infoDictionary.
In that case I used localizedInfoDirectory like below.
NSDictionary *locinfo = [bundle localizedInfoDictionary];
tokentoken
2010-01-10 21:07:05
A:
Thanks. OR you can use the direct approach,
in .h file,
IBOutlet UILabel *lableAppName;
labelAppName.text = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
karim
2010-05-19 10:40:27