今天要把之前一個項目按新需求做更新,項目在iPad2和iPad Retina模擬器上運行都沒有問題,但是在iPad Air上運行時卻包了3個錯誤,如下圖
想來應該是64位適配的問題,在網上搜索各種解決方案無果,只好請教這個項目之前的開發人員,按他要求把Valid Architectures改爲armv7,如下圖
在運行,果然編譯成功了,那麼這個Valid Architectures和上面的Architectures是什麼東西呢?
在網上搜索到這篇文章Xcode設置項之Architectures和Valid Architectures
大意如下:
- 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.
- 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.
- Boolean value. Specifies whether the product includes only object code for the native architecture.