26

Is it possible that Xcode 6.1 doesn't finds my previously imported frameworks because of my 3 word app name? I'm using Parse and never ever had any problems with it. But actually when I open my project in Xcode I got an error that the framework doesn't found, which is absurd because it worked well earlier and I don't removed it. However if I delete the frameworks and add them again everything is fine. Am I doing something wrong or is it an Xcode bug?

ld: warning: directory not found for option '-F/Users/donip/Documents/Fl Travel Guide/Fl'
ld: warning: directory not found for option '-FTravel'
ld: warning: directory not found for option '-FGuide'
ld: framework not found ParseFacebookUtils
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rihekopo
  • 3,241
  • 4
  • 34
  • 63
  • Have you tried this? Adding backslashes `-F/Users/donip/Documents/Fl\ Travel\ Guide/Fl` – Yuchen Jan 26 '15 at 18:18
  • @YuchenZhong nope. I should rename the folder or something like that? – rihekopo Jan 26 '15 at 18:19
  • i mean add '\' before space. So it looks like this `Fl\ Travel\ Guide/Fl` – Yuchen Jan 26 '15 at 18:20
  • @YuchenZhong I understand, but where should I add them? Do I need to create a new project or just edit the folder name? – rihekopo Jan 26 '15 at 18:25
  • Just to make sure I understand this question: Do you mean you get this problem after you upgrade to Xcode 6.1? And it is all fine before? And if you remove and reimport the framework, everything works just fine? – Yuchen Jan 26 '15 at 18:55
  • @YuchenZhong No. I created the project in 6.1, everything worked well until I closed Xcode. After I opened it again got the error, then deleted & added the frameworks again and now it works. – rihekopo Jan 26 '15 at 18:59
  • Can you provide your "Framework search path" and actual framework path in Finder? – Yuvrajsinh Feb 11 '15 at 12:35
  • @mr.lefthand please accept any answer that suits best. – Muhammad Zeeshan Sep 18 '16 at 08:55

5 Answers5

46

Simply enclose your framework path in double quotes(""). For example:

"$(SRCROOT)/my framework/path"

enter image description here

Muhammad Zeeshan
  • 2,441
  • 22
  • 33
8

"directory not found for option '-F/..."

Here '-F/..' shows it's a Framework Error. There could be 2 reasons for this.

  1. Missing escape "\" character.

    It seems search paths are broken up on several lines in the Framework Search Path or Library Search Paths. Or having spaces in path. Add the escape "\" character to fix it.

  2. Click on your project (targets)-> Click on Build Settings-> Under Frameworks Search Paths, delete the paths.

Jason Sturges
  • 15,855
  • 14
  • 59
  • 80
Saurabh Shukla
  • 1,368
  • 3
  • 14
  • 26
4

I'm sure this is Xcode bug. Since a lot of other developers have problems with frameworks paths, such as Absolute path issues I'm sure You will find other issues too in SO.

I have encountered this issues myself too. Best solution for me just commit working project files, and then reset/revert new/wrong changes which done by Xcode.

Community
  • 1
  • 1
David V
  • 2,134
  • 1
  • 16
  • 22
3

For me, I had to delete (using Terminal):

/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/PROJECT_NAME

Using:

rm -r PROJECT_NAME-xxxxxxxx

If you have multiple projects with the same name in the /DerivedData folder, first try deleting all but the most recent one. If that does not work, try deleting all projects including the most recent.

atwalsh
  • 3,622
  • 1
  • 19
  • 38
1

Just update your library location to such a path which doesn't have any spaces inbetween. For example, instead of :

'-F/Users/donip/Documents/Fl Travel Guide/Fl'

use

'-F/Users/donip/Documents/FlTravelGuide/Fl'

Just change the folder name, available in that path, then make the same change in project settings in Library Search Paths and Header Search Paths, wherever its been referred.

Hope this will resolve your query.

Mrunal
  • 13,982
  • 6
  • 52
  • 96