ld: library not found for -lAFNetworking xcode

also make sure you are running the .xcworkspace project (white icon),not the .xcodeproj project (blue icon)

green box == .xcworkspace project


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.

add $(inherited) flag to LIBRARY_SEARCH_PATHS at build settings in Xcode target.