美文网首页
ios中的 [[NSBundle mainBundle] inf

ios中的 [[NSBundle mainBundle] inf

作者: hoggenWang | 来源:发表于2016-10-13 16:32 被阅读1064次

总的来说,取出来的内容有这些


tmp3609470d.png

好吧,一般用到的就是这些
版本号:Bundle version

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

应用标识:Bundle identifier

NSString *bundleId = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];

应用名称:Bundle display name

NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];

Bundle name

NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];

相关文章

网友评论

      本文标题:ios中的 [[NSBundle mainBundle] inf

      本文链接:https://www.haomeiwen.com/subject/flgwyttx.html