Ld: framework not found GTMSessionFetcher after installing pod

I added Firebase libraries to my project and then got this error. When I compile it, Xcode cannot 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 subfile:

 # 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 
+7
source share
4 answers

Make sure that you open the workspace file, not the project file. I was getting the same error and realized that I was using a project and not a workspace.

+37
source

I ran into the same problem and I tried several things but still didn't work. I tried below.

  • Using the XCworkspace File
  • Project Cleanup, Restart Xcode, Mac
  • Rotated Bit Code to No
  • Removed search path for Framework, Library

Finally, everything that worked removes the pod file and recreates the pod file. He worked like magic!

PS: This is a very common mistake, and therefore the same solution may not work for everyone.

+2
source

Go to Project Object> Build Settings:

Search for search paths > Search paths in the framework , delete all paths that you have been warned about; then in the Library Search Path , delete all the paths that you warned.

+1
source

For me, I had to change / edit the scheme and select a new one.

I renamed my debug scheme to debug(development) and this caused my problem.

Fix:

  1. Product > Edit Schema > Change Build Configuration

Edit schema

I created alternative Configurations and renamed my current.

enter image description here

0
source

Source: https://habr.com/ru/post/1011852/


All Articles