16

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
えるまる
  • 2,409
  • 3
  • 24
  • 44
  • What is your question? http://stackoverflow.com/help/how-to-ask – jacefarm Oct 29 '16 at 20:44
  • You need to show some effort or research to detail how you have tried to debug this. This will help narrow down the problem and create a more specific question. Right now, it seems that you have not made these debugging attempts or research, and just want someone else to do the work for you. – jacefarm Oct 30 '16 at 17:51
  • As a first step, try commenting out the Firebase pods, and see if you still get the GTMSessionFetcher error. The error is about GTMSessionFetcher, not Firebase. Start there maybe? – jacefarm Oct 30 '16 at 17:54
  • Likely the same issue and similar solution as http://stackoverflow.com/questions/40358719/framework-not-found-googletoolboxformac – Paul Beusterien Nov 01 '16 at 19:28
  • 2
    Make sure you're opening the xcworkspace and not the xcodeproj file. – Paul Beusterien Nov 02 '16 at 22:40
  • 1
    we're using GAE endpoints and the IOS API generator builds GTMSessionFetcher it into the generated code.....but GTMSessionFetcher also exists in Firebase and we're seeing a warning that this class is implemented both places and it's undefined which will be used.....in case that helps anyone – Dewey Nov 11 '16 at 19:32

5 Answers5

56

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.

genghiskhan
  • 1,095
  • 12
  • 21
5

I was facing same issue and I tried multiple things but still it was not working. I tried below.

  1. Using XCworkspace file
  2. Cleaned the project, restarted XCode, Mac
  3. Turned bitcode to No
  4. Deleted the search path for Framework, Library

Finally the thing that worked is, deleting pod file and re-creating pod file. It worked as magic!

P.S.: This is very generic error and so same solution may not work for all.

Pandurang Yachwad
  • 1,695
  • 1
  • 19
  • 29
2

Go To Project Target > Build Settings:

Look for Search Paths > Framework Search Paths, delete all paths which you have been warned; then in Library Search Paths, delete all paths which you have been warned.

Mayank Modi
  • 73
  • 2
  • 9
2

For me i had to change/edit the schema and choose the new one.

I had renamed my debug schema to debug(development) and that was causing my problem.

Fix:

  1. Product > Edit Schema > Change Build Configuration

Edit Schema

What I did was create alternate Configurations and renamed my current one.

enter image description here

Roger Perez
  • 2,807
  • 29
  • 31
-1

In my case I just had to go to Edit Scheme > Run and Reselect "None" as Executable.