使用Cocoapods安装AFNetworking后出现未定义的符号

时间:2016-02-19 13:58:34

标签: ios xcode afnetworking cocoapods

任何人都可以帮我这个,它让我疯狂。我看了一下我能找到的类似问题的每一篇文章,但都没有奏效。

我在AFNetworking 3.0的项目中安装了Cocoapods,安装了它,我在项目中看到了AFNetworking pod。每当我尝试构建时,我都会收到以下错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_AFHTTPSessionManager", referenced from:
      objc-class-ref in Server.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:1)

I solved the problem after further investigating.

I added libAFNetworking.a in Project->Build Phases->Link Binary With Librarys

It is now compiling correctly.