CocoaPods not linking with the project

折月煮酒 提交于 2019-12-07 09:54:59

问题


I have a project that uses CocoaPods. It was working but something got broken.

It does compile if I target the simulator, but If I target the devise (Build or Archive) it throws a linker error.

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)

I really need some help because I am really stucked.

Thanks!

EDIT: i deleted that libPods.a, that was an old one, and now it's giving me:

ld: library not found for -lPods

But only on Archive or Build for iosDevice, this is still working on the simulator.


回答1:


Try removing armv7s from valid architectures section.

Build Settings -> Architectures -> Valid Architectures



来源:https://stackoverflow.com/questions/23617288/cocoapods-not-linking-with-the-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!