ios - 文件是为 arm64 构建的,它不是链接的体系结构 (x86_64)

标签 ios objective-c xcode swift

我正在构建一个首先在我的 ios 模拟器中使用的框架。但是,将其导入主项目时出现此错误:

file was built for arm64 which is not the architecture being linked (x86_64)

这是我的框架的构建信息: enter image description here

更新:

我使用这种技术创建了一个通用框架:https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c但我仍然收到错误

更新:在二进制文件上运行文件的结果:

hunterp$ file dinkle 
dinkle: Mach-O universal binary with 2 architectures
dinkle (for architecture x86_64):   Mach-O 64-bit dynamically linked shared library x86_64
dinkle (for architecture arm64):    Mach-O 64-bit dynamically linked shared library

最佳答案

我错误地复制了二进制框架并使用了一个旧框架,然后才将其更改为通用框架。

关于ios - 文件是为 arm64 构建的,它不是链接的体系结构 (x86_64),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30118010/

相关文章:

ios - 有没有办法使用私有(private) API 在 iOS 10+ 中获取 iPhone 充电器的信息?

ios - 如何将 CNContactPickerViewController 与 objective-c 一起使用?

ios - 处理 JSON 时动画卡住

xcode - flutter Xcode : clang: error: linker command failed with exit code 1 (use -v to see invocation)

ios - Interface Builder——NIB 中 UIView 上真正奇怪的框架起源

ios - React-native@0.26.3 需要 react@15.0.2 的对等点,但没有安装

iOS swift ImagePickerController : Improving Edit Mode

ios - 在 Storyboard 中设置 subview 相对于父 View 的高度

iphone - 3G网络中NSPOSIXErrorDomain Code=12 "Cannot allocate memory"

ios - mediaTypesRequiringUserActionForPlayback 无法工作 Swift