gpt4 book ai didi

iphone - 从 Info.plist 读取版本

转载 作者:IT老高 更新时间:2023-10-28 11:21:15 25 4
gpt4 key购买 nike

我想将 Info.plist 中的包版本信息读入我的代码,最好是作为字符串。我该怎么做?

最佳答案

你可以把你的 Info.plist 当作字典来阅读

[[NSBundle mainBundle] infoDictionary]

您可以通过 CFBundleVersion 键轻松获取版本。

最后,你可以得到版本

NSDictionary* infoDict = [[NSBundle mainBundle] infoDictionary];
NSString* version = [infoDict objectForKey:@"CFBundleVersion"];

关于iphone - 从 Info.plist 读取版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4059101/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com