ld: framework not found after pod install

えるまる picture えるまる · Oct 29, 2016 · Viewed 18.2k times · Source

I added Firebase libraries to my project, and then I got this error. When I compile it, Xcode can't find some directories. However, they are in the Pods directory.

Here is the error log:

ld: warning: directory not found for option '-F/Users/Erumaru/Library/Developer/Xcode/DerivedData/ToDoTogether-gkzytezmbbgkikgoxjpptxgrixil/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/Erumaru/Library/Developer/Xcode/DerivedData/ToDoTogether-gkzytezmbbgkikgoxjpptxgrixil/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: framework not found GTMSessionFetcher
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Here is my Podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'ToDoTogether' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  platform :ios, '10.0'
    pod 'Firebase'
    pod 'Firebase/AdMob'  
    pod 'Firebase/Auth'
    pod 'Firebase/Crash'
    pod 'Firebase/Database'
    pod 'Firebase/Analytics'
    pod 'Firebase/Messaging'
    pod 'Firebase/RemoteConfig'
    pod 'Firebase/Storage'

  # Pods for ToDoTogether

end

Answer

genghiskhan picture genghiskhan · Nov 14, 2016

Make sure you are opening the workspace file and not the project file. I was receiving the same error and realized I was using the project not the workspace.