我正在构建一个首先在我的 ios 模拟器中使用的框架。但是,将其导入主项目时出现此错误:
file was built for arm64 which is not the architecture being linked (x86_64)
这是我的框架的构建信息:
更新:
我使用这种技术创建了一个通用框架: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/