真机32位处理器需要armv7,或者armv7s架构
真机64位处理器需要arm64架构
arm64 | armv7s | armv7 |
---|---|---|
iPhone6s | iPhone5 | iPhone4 |
iphone6s plus | iPhone5C | iPhone4S |
iphone6 | iPad4(iPad with Retina Display) | iPad |
iphone6 plus | iPad2 | |
iphone5s | iPad3(The New iPad) | |
iPad Air | iPad mini | |
iPad mini2 (iPad mini with Retina Display) | iPod Touch 3G | |
iPod Touch4 |
模拟器32位处理器测试需要i386架构
模拟器64位处理器测试需要x86_64架构
i386是针对intel通用微处理器32位处理器
x86_64是针对x86架构的64位处理器
Xcode Build Setting中指令集相关选项释义
Architectures
指定工程被编译成可支持哪些指令集类型,而支持的指令集越多,就会编译出包含多个指令集代码的数据包,对应生成二进制包就越大,也就是ipa包会变大(Space-separated list of identifiers. Specifies the architectures (ABIs, processor models) to which the binary is targeted. When this build setting specifies more than one architecture, the generated binary may contain object code for each of the specified architectures. )。
Valid Architectures
限制可能被支持的指令集的范围,也就是Xcode编译出来的二进制包类型最终从这些类型产生,而编译出哪种指令集的包,将由Architectures与Valid Architectures(因此这个不能为空)的交集来确定(Space-separated list of identifiers. Specifies the architectures for which the binary may be built. During the build, this list is intersected with the value of ARCHS build setting; the resulting list specifies the architectures the binary can run on. If the resulting architecture list is empty, the target generates no binary.)。
Build Active Architecture Only
指定是否只对当前连接设备所支持的指令集编译
当其值设置为YES,这个属性设置为yes,是为了debug的时候编译速度更快,它只编译当前的architecture版本,而设置为no时,会编译所有的版本。 所以,一般debug的时候可以选择设置为yes,release的时候要改为no,以适应不同设备。