IOS 获取APP 版本号的实例详解
2017-07-15 10:02
337 查看
IOS 获取APP 版本号的实例详解
看代码的时候看到一句,用于获取.plist文件的版本号
labelVersion.text = [NSString stringWithFormat:@"v%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]];
比较感兴趣的是后面的参数 kcFBundleVersionKey ,竟然是CFBundle.h已经定于好的属性,下面有这个属性的注释
const CFStringRef kCFBundleVersionKey; /* The version number of the bundle. For Mac OS 9 style version numbers (for example "2.5.3d5"), */ /* clients can use CFBundleGetVersionNumber() instead of accessing this key directly since that */ /* function will properly convert the version string into its compact integer representation. */
还有好多是kcFXXX开头的Standard Info.plist keys 属性,有兴趣可以自己看一下CFBundle.h,研究一下它们的用法,
以上就是IOS 获取APP 版本号的简单实例,关于IOS 开发的文章本站还有很多,大家可以参考,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
您可能感兴趣的文章:
相关文章推荐
- iOS获取当前app的名称和版本号 配置属性
- IOS 获取IOS屏幕尺寸大小以及 获取当前app的名称和版本号
- Android获取手机型号/系统版本号/App版本号等信息实例讲解
- iOS获取设备型号和App版本号等信息
- iOS获取当前app版本号和使用设备
- iOS获取APP的版本号
- iOS 获取程序~项目app名称、版本号、build版本
- iOS-获取Model(设备型号)、Version(设备版本号)、app(程序版本号)等
- iOS获取当前app版本号
- iOS获取当前app的名称和版本号
- Cordova webapp实战开发:(6)如何写一个iOS下获取APP版本号的插件?
- iOS获取设备型号和App版本号等信息
- ios获取app版本号
- ios获取app当前的版本号
- ios开发之 获取APP版本号/跳转APPStore(下载页/评论页)
- iOS开发笔记之获取App版本号、获取iOS系统版本
- IOS-获取Model(设备型号)、Version(设备版本号)、app(程序版本号)等
- iOS获取当前app的名称和版本号
- IOS-获取Model(设备型号)、Version(设备版本号)、app(程序版本号)等
- iOS获取当前app的名称和版本号