ios中的 [[NSBundle mainBundle] infoDictionary]

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


ios中的 [[NSBundle mainBundle] infoDictionary]_第1张图片
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] infoDictionary])