这篇文章主要介绍了IOS 获取APP 版本号的实例详解的相关资料,需要的朋友可以参考下
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 播放系统提示音使用总结(AudioToolbox) 2023-03-01
- Android开发使用RecyclerView添加点击事件实例详解 2023-06-15
- 解决Android Studio突然不显示logcat日志的问题 2023-02-04
- iOS开发教程之XLForm的基本使用方法 2023-05-01
- IOS应用内跳转系统设置相关界面的方法 2022-11-20
- Android多返回栈技术 2023-04-15
- Flutter手势密码的实现示例(附demo) 2023-04-11
- android studio按钮监听的5种方法实例详解 2023-01-12
- Android中的webview监听每次URL变化实例 2023-01-23
- Flutter绘图组件之CustomPaint使用详解 2023-05-12
