5

I am consistently getting this error each time I try to build my project:

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

I don't even know what framework is called -framework

This random started two days back just after a commit on a view controller that was not related to any changed in the pods.

I have tried all the solutions. I did google and spent time approx. 12 hours and found this links : link1, link2, link3.

Also found lots other links but none are to the point which i am looking for.

I attempted below techniques to solve the problem:

  1. Deleting Derived Data - Rebooting Xcode - Cleaning & Building the Project.
  2. Deleting/ Adjusting the Framework Search Paths
  3. Adding -framework to Other Linker Flags in the Build Settings of the target project.

Could anyone PLEASE help me if there are any further ideas on getting rid this -framework error. I am due for launch in a month and can't re-start building the project from scratch!!!

By the way I am using cocoa pods to handle all the private frameworks which has workout out fine all along.

Thanks in advance.

Here is a screen shot of the error. enter image description here

Here are the screen shots of the framework search paths. enter image description here enter image description here

Community
  • 1
  • 1
Gugulethu
  • 1,426
  • 3
  • 18
  • 36

3 Answers3

7

Your Other Linker flags seemed to have the -framework added which was failing to compile.

Always make sure to check framework/library and linker path flags if the project shows framework/library not found error.

Shubhank
  • 21,721
  • 8
  • 65
  • 83
  • It was the cas efor my projet: 'framework' was listed in the Other Linker Flags of the project Build settings (not the taregt Build settings that was inheriting it). – Nicolas Buquet Nov 28 '16 at 05:47
3

I had a simular error in one of our projects. It turned out that the framework itself got corrupted / damaged. Probably because of symlinks in combination with git.
For some reasone the actual binary in the .framework file was missing.
Which would make XCode throw that specific compile error.

Solution was to replace the framework with the 'original' one and even move the framework to another (sub)directory in the project, so git was able to "pick it up" again.

basvk
  • 4,437
  • 3
  • 29
  • 49
0

I got the same error message and then I realised that the .framework was build for iphoneos (real device) but then I was trying to include it and run it on iphonesimulator (Simulator).

Nikolay Suvandzhiev
  • 8,465
  • 6
  • 41
  • 47