使用 xcode 将 IOS 静态库架构设置为 "arm64"
setting an IOS static lib architecture to "arm64" using xcode
我正在为 IOS 构建静态库作为 xCode 目标(Cocoa 触摸静态库)。我尝试 "force" 将归档产品(.a 文件)甚至中间对象(.o 文件)构建在 "arm64" 体系结构中。我使用 xCode 构建设置来做到这一点:
清理并构建此目标后,我使用终端命令 lipo -info
检查架构,但看起来架构是 x86_64:
我在路上错过了什么?我怎样才能强制我想要的架构?
您正在为 iOS 模拟器平台构建库。选择 "Generic iOS Device" 作为目标平台,您将获得 arm64 架构。
您可以在 UI 中设置此设置:
或者通过将 -sdk iphoneos
选项传递给 xcodebuild:
xcodebuild -project 44635297.xcodeproj -target 44635297 -configuration Release clean build -sdk iphoneos
将构建设置中的 'Base SDK' 更改为 'Latest iOS'。
我正在为 IOS 构建静态库作为 xCode 目标(Cocoa 触摸静态库)。我尝试 "force" 将归档产品(.a 文件)甚至中间对象(.o 文件)构建在 "arm64" 体系结构中。我使用 xCode 构建设置来做到这一点:
清理并构建此目标后,我使用终端命令 lipo -info
检查架构,但看起来架构是 x86_64:
我在路上错过了什么?我怎样才能强制我想要的架构?
您正在为 iOS 模拟器平台构建库。选择 "Generic iOS Device" 作为目标平台,您将获得 arm64 架构。
您可以在 UI 中设置此设置:
或者通过将 -sdk iphoneos
选项传递给 xcodebuild:
xcodebuild -project 44635297.xcodeproj -target 44635297 -configuration Release clean build -sdk iphoneos
将构建设置中的 'Base SDK' 更改为 'Latest iOS'。