[NSBundle mainBundle] infoDictionary

[NSBundle mainBundle] infoDictionary获取到的是当前程序的信息,通过控制台打印出下面这些信息

{
BuildMachineOSBuild = 16B2657; //mac 版本
CFBundleDevelopmentRegion = en; //本地化设置,默认为en
CFBundleExecutable = UpdateTip; //安装包名称
CFBundleIdentifier = “com.hcb.UpdateTip”; //bundle id
CFBundleInfoDictionaryVersion = “6.0”; //info.plist格式化版本号
CFBundleName = UpdateTip; //程序名称
CFBundleNumericVersion = 16809984; //bundle版本
CFBundlePackageType = APPL; //包类型
CFBundleShortVersionString = “1.0”; //版本号
CFBundleSupportedPlatforms = (
iPhoneSimulator
); //支持的平台
CFBundleVersion = 1; //版本号
DTCompiler = “com.apple.compilers.llvm.clang.1_0”;
DTPlatformBuild = “”; //运行平台
DTPlatformName = iphonesimulator; //当前运行平台名称
DTPlatformVersion = “10.2”; //平台版本
DTSDKBuild = 14C89; //模拟器系统版本
DTSDKName = “iphonesimulator10.2”; //模拟器系统名称
DTXcode = 0821; //xcode
DTXcodeBuild = 8C1002; //xcode版本
LSRequiresIPhoneOS = 1; //是否只运行在iphone中
MinimumOSVersion = “8.0”;//支持最低系统版本
UIDeviceFamily = (
1
);
UILaunchStoryboardName = LaunchScreen;
UIMainStoryboardFile = Main; //MainStoryboard文件
UIRequiredDeviceCapabilities = (
armv7
); //针对哪些指令集进行编译
UISupportedInterfaceOrientations = (
UIInterfaceOrientationPortrait,
UIInterfaceOrientationLandscapeLeft,
UIInterfaceOrientationLandscapeRight
); //支持屏幕旋转方向
}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,080评论 19 139
  • 总的来说,取出来的内容有这些 好吧,一般用到的就是这些版本号:Bundle version 应用标识:Bundle...
    hoggenWang阅读 5,831评论 1 3
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,898评论 25 709
  • Info.plist 用于向 iOS 提供关于 app , bundle 或者 framework 的一些重要信息...
    Alfred_小乐阅读 2,495评论 1 0
  • 噢,蜡烛,你是多么可爱 当会发光的机器都不亮时 你打破了黑暗 周围一切都是如此熟悉而又陌生 我看到了一些以前所看不...
    青鹿阅读 569评论 0 4