在运行时获取iPhone应用程序的产品名称? [英] Getting an iPhone app's product name at runtime?

查看:71
本文介绍了在运行时获取iPhone应用程序的产品名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何实现这一目标?我想得到这个名字,所以我可以在应用程序中显示它,而不必在每次更改名称时更改代码。

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.

推荐答案

试试这个

NSBundle *bundle = [NSBundle mainBundle];
NSDictionary *info = [bundle infoDictionary];
NSString *prodName = [info objectForKey:@"CFBundleDisplayName"];

这篇关于在运行时获取iPhone应用程序的产品名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆