我有一个使用 CocoaPods 的项目。它正在工作,但有些东西坏了。
如果我以模拟器为目标,它确实可以编译,但如果我以设计(构建或存档)为目标,它会抛出链接器错误。
ld: warning: ignoring file /Users/myuser/ios/share/share/libPods.a, file was built for archive which is not the architecture being linked (armv7s): /Users/myuser/ios/share/share/libPods.a
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in BackendProxy.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我真的需要一些帮助,因为我真的被困住了。
谢谢!
编辑:我删除了那个 libPods.a,那是一个旧的,现在它给了我:
ld: library not found for -lPods
但仅在 iosDevice 的 Archive 或 Build 上,这仍在模拟器上运行。
最佳答案
尝试从 valid architectures
部分删除 armv7s
。
Build Settings -> Architectures -> Valid Architectures
关于ios - CocoaPods 未与项目链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23617288/