使用xcode将IOS静态lib体系结构设置为“arm64”

时间:2017-06-19 16:10:19

标签: ios xcode ios-simulator

我正在为IOS构建一个静态库作为xCode目标(Cocoa touch静态库)。我试图“强制”归档产品(.a文件)甚至中间对象(.o文件)构建在“arm64”架构中。我使用xCode Build Settings来做到这一点: https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.T.html

清理并构建此目标后,我使用终端命令lipo -info检查架构,但看起来架构是x86_64: enter image description here

我错过了什么?我怎么能强迫我想要的建筑呢?

2 个答案:

答案 0 :(得分:2)

您正在为iOS模拟器平台构建您的库。选择"通用iOS设备"作为目标平台,您将获得arm64架构。

您可以在UI中设置此设置: enter image description here

或者将-sdk iphoneos选项传递给xcodebuild:

xcodebuild -project 44635297.xcodeproj -target 44635297 -configuration Release clean build -sdk iphoneos

答案 1 :(得分:0)

将构建设置中的“基本SDK”更改为“最新iOS”。

enter image description here