iOS|iOS 获取版本信息的小部分问题

iOS 获取版本信息之类的问题,整理一小部分

1:获取bundle Id信息:[[NSBundle mainBundle]bundleIdentifier];
2: 获取App显示名:[[[NSBundle mainBundle]infoDictionary] objectForKey:@"CFBundleDisplayName"];

3:获取版本号:[[[NSBundle mainBundle]infoDictionary] objectForKey:@"CFBundleVersion"];

[[NSBundle mainBundle]infoDictionary] 获得的是一个字典,里边放着Info.plist文件中的各种信息,根据不同的键去即可,如:
CFBundleDevelopmentRegion
CFBundleDisplayName
【iOS|iOS 获取版本信息的小部分问题】CFBundleExecutable
CFBundleExecutablePath
CFBundleIdentifier
CFBundleInfoDictionaryVersion = "6.0";
CFBundleInfoPlistURL
CFBundleName
CFBundlePackageType
CFBundleShortVersionString
CFBundleSignature
CFBundleSupportedPlatforms

    推荐阅读