Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

external framework File/File.h (Parse/Parse.h) file not found

So every time I update my app, Xcode claims not to be able to find a particular external framework even though it's there. It's happened again with Xcode 6 and my usual methods (I'm fairly inexperienced, so these basically involve clicking and typing things until something happens (I exaggerate but not by much)) aren't working.

I'm getting a Lexical or Preprocessor Issue error that says 'Parse/Parse.h' file not found.' But here are screenshots of it in the project and added to the library:

enter image description here

enter image description here

I also followed the steps in the most upvoted answer at ‘ld: warning: directory not found for option’ but still nothing.

Any idea what to do? Any idea at all? I'm tearing my hair out here.

like image 230
Joel Derfner Avatar asked Sep 10 '14 11:09

Joel Derfner


4 Answers

Actually I was facing the same problem but after doing lots of (removing/adding parse framework) efforts I come to know that parse.framework is already added and error was still there.

Real Problem was not in link Binary for main project but it was with Tests link Binary. Lets say your project name is "project1" and Xcode create one more folder with it called "project1Tests". So select "project1Tests" and add parse.framework in link Binary.

Check out the hierarchy:

PROJECT
project1

TARGETS
project1
project1Tests (you need to select this to add parse framework).

Hope this would help you resolve this issue.

like image 126
Sukhchain Avatar answered Oct 15 '22 22:10

Sukhchain


I had this error also. I'm developing in Swift, so I added a "bridge header" as described in this Parse blog post.

The reason I got the "Parse.h not found" was that my project name contained spaces. (For project name I mean the Product Name you enter when creating a new project, which determines your folder's name.) The first day all went well, but after closing and opening Xcode, it turns out that Xcode interprets the words separated by spaces as different paths.

To fix this, you can go to Build Settings -> Search Paths -> Framework Search Paths and add an "\" before each space. (If you double click the path you'll see that Xcode shows each word separated by space as a different entry.)

Also note that the bridge header with #import <Parse/Parse.h> it's not compulsory: you can simply do import Parse.

like image 39
Albert Vila Calvo Avatar answered Oct 15 '22 22:10

Albert Vila Calvo


All I had to do was remove Parse.framework from this list by highlighting and pressing delete.

enter image description here

Then I went down to the plus sign at the bottom of that list and had to select Add Other and manually locate the downloaded .framework file.

enter image description here

like image 5
Marcel Gruber Avatar answered Oct 15 '22 22:10

Marcel Gruber


In my case, the error went away after I added the path to the directory where Parse.framework was to the Frameworks Search Paths Build Setting:

Framework Search Paths

My project didn't even have an entry for that setting, so you may need to create it as well.

like image 5
Willington Vega Avatar answered Oct 15 '22 22:10

Willington Vega