这篇文章主要介绍了IOS 获取APP 版本号的实例详解的相关资料,需要的朋友可以参考下
IOS 获取APP 版本号的实例详解
看代码的时候看到一句,用于获取.plist文件的版本号
labelVersion.text = [NSString stringWithFormat:@"v%@", [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]];
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 版本号的实例详解
猜你喜欢
- SurfaceView播放视频发送弹幕并实现滚动歌词 2023-01-02
- Flutter实现底部和顶部导航栏 2022-08-31
- 详解flutter engine 那些没被释放的东西 2022-12-04
- Android studio实现动态背景页面 2023-05-23
- 最好用的ios数据恢复软件:PhoneRescue for Mac 2023-09-14
- Android实现监听音量的变化 2023-03-30
- Android MaterialButton使用实例详解(告别shape、selector) 2023-06-16
- Android实现轮询的三种方式 2023-02-17
- 作为iOS开发,这道面试题你能答出来,说明你基础很OK! 2023-09-14
- iOS 对当前webView进行截屏的方法 2023-03-01
