ios - 使用 xcode 将 IOS 静态库架构设置为 "arm64"

标签 ios xcode ios-simulator

我正在为 IOS 构建一个静态库作为 xCode 目标(Cocoa touch 静态库)。我尝试“强制”在“arm64”架构中构建存档产品(.a 文件)甚至中间对象(.o 文件)。我使用 xCode Build Settings 来做到这一点: enter image description here

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

我错过了什么?我怎样才能强制我想要的架构?

最佳答案

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

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

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

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

关于ios - 使用 xcode 将 IOS 静态库架构设置为 "arm64",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44635297/

相关文章:

ios - ios中的位置时间戳准确性

iphone - Zombies工具如何运行iPhone程序?

ios - iTunes Connect 截图不接受 iPad PRO 截图

ios - 无法启动iphone模拟器; "not responding"。 Xcode 7,模拟器版本 9(适用于 iOS 9)

ios - 我可以通过拉伸(stretch)UILabel的角来改变IOS模拟器中UILabel运行时的框架吗?

ios - 3D 触控 : registerForPreviewing in UICollectionViewCell

ios - 账号包: Set the default language for iOS app

ios - 快速设置另一个 View 的背景

ios - Swift:从其他 Viewcontroller 调用 PageViewController 中的函数

ios - 无法在真实设备上更新 plist 文件