xcode library not found

You need to set the "linker search paths" of the project (for both Debug and Release builds). If this library was in, say, a sibling directory to the project then you can set it like this:

$(PROJECT_DIR)/../GoogleAnalytics/lib

(you want to avoid using an absolute path, instead keep the library directory relative to the project).


In my case, the project uses CocoaPods. And some files are missing from my project.

So I install it from CocoaPods: https://cocoapods.org/.

And if the project uses CocoaPods we've to be aware to always open the .xcworkspace folder instead of the .xcodeproj folder in the Xcode.


All in all, the Xcode cannot find the position of library/header/framework, then you tell Xcode where they are.

set the path that Xcode use to find library/header/framework in Build Settings --> Library/Header/Framework Search Paths.

Say, now it cannot find -lGoogleAnalytics, so you add the directory where -lGoogleAnalytics is to the Library Search Paths.


In my case I had a project with lots of entries in "Build Settings > Other Linker Flags"

I needed to reduce it down to just

  $(inherited)
  -ObjC

Old settings:

old settings

Updated settings:

enter image description here