c00der c00der - 1 year ago 342
iOS Question

ld: library not found for -lAFNetworking xcode

I am a total newbie to ios programming. Cloned a friends project. When trying to build (after resolving a lot of other errors), I get the following error:

ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I checked the Pod file and searched for AFNetworking in the project, and it is there. Don't know what is going wrong.

Answer Source

The error message indicates that the library was not found.

Make sure that:

  1. You see the AFNetworking in your Pods directory.
  2. Your Pods directory is in the search paths. Go to the project -> Build Settings -> Search for 'search paths' and make sure that your Pods directory is there. You can add it by adding "${PROJECT_DIR}/Pods" for example.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download