[Object-c] 获取版本号等信息

来源:互联网 发布:asp在线客服系统源码 编辑:程序博客网 时间:2024/06/08 13:57

获取app的版本号等信息

1.获取版本号:

[[NSBundle mainBundle]objectForInfoDictionaryKey:@"CFBundleShortVersionString"]];

2.获取bulid号:

[[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey];[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];

3.获取项目名称:

[[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey];

4.app的名称

[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]];
0 0
原创粉丝点击