3

This error suddenly showed up in my Swift program

ld: framework not found GTMSessionFetcher clang: error: linker command failed with exit code 1 (use -v to see invocation)

but I have it as one of the frameworks enter image description here

and this is the pod file

enter image description here

I have remove cocoapods and reinstalled it and no result

I have clean and open the workspace instead of the project and still no changes.

I have tried all approaches from similar questions and still no luck. some of the answers I've looked at are Apple Mach-O Linker Warning "Directory Not Found For Option..."

Linker command failed with exit code 1 after installing CocoaPods and firebase pod

https://www.bountysource.com/issues/39247126-clang-error-linker-command-failed-with-exit-code-1-use-vto-see-invocation

I noticed my error is somewhat unique to what I have been seeing from others in that it's a GTMSessionFetcher error. How can I fix this and get rid of the error?

Cœur
  • 37,241
  • 25
  • 195
  • 267
e.iluf
  • 1,389
  • 5
  • 27
  • 69

1 Answers1

0

First, try running pod install.

It looks like GTMSessionFetcher.framework is grayed out, which means that the file was deleted. If pod install doesn't work, try removing each grayed-out framework file from the list and dragging it back in (either from the project folder or from the sidebar under "Products").

Coder-256
  • 5,212
  • 2
  • 23
  • 51
  • i tired both option and still not changes – e.iluf Dec 15 '17 at 23:36
  • When you tried the second option, was it still grayed out after? – Coder-256 Dec 15 '17 at 23:41
  • When I say "remove it from the list", I mean select the grayed-out framework and click the "-" icon. Make sure that's what you're doing. Also, where are you dragging the frameworks back in from? Have you checked your build phases (especially "Target Dependencies" and "[CP] Embed Pods Frameworks")? – Coder-256 Dec 15 '17 at 23:49
  • yes I did just that. I removed the file from the folder below and run pod install which reinstalled the folder – e.iluf Dec 16 '17 at 00:02
  • Where are you dragging the framework files themselvess back in from? Have you checked your build phases (especially "Target Dependencies" and "[CP] Embed Pods Frameworks")? – Coder-256 Dec 16 '17 at 00:24
  • projectTest and projectUITest are the only dependencies there – e.iluf Dec 16 '17 at 03:46
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/161344/discussion-between-coder256-and-learner101). – Coder-256 Dec 16 '17 at 03:58
  • the chat timed out – e.iluf Mar 27 '18 at 16:59