Dolo
Dolo

Reputation: 976

Header files are not added with framework kit in ios xcode

I'm so new to xcode, I have a speechkit framework with following files as shown in image below

enter image description here

Now When I add this framework to my xcode project the header files are shown empty as below

enter image description here

and I end up with build error 'Lexical preprocessor issue SpeechKit/SpeechKit.h' file not found'. What is the issue with it? How to solve this?

Upvotes: 7

Views: 6581

Answers (5)

sandy
sandy

Reputation: 1072

What i found that if you unzip any downloaded sample code and you get any lexical/preprocessor issue then just simply add that framework again by follow these steps Go to your target's settings and select the 4th tab (Build Phase). Open the "Compile Sources" phase and click on the '+' symbol and add your framework by clicking on (add other from sample code folder) option.

Upvotes: 0

Jitendra
Jitendra

Reputation: 5081

Your framework wasn't compiled successfully. You need to add the framework to the "Compile Sources" build phase.

Go to your target's settings and select the 4th tab (Build Phase). Open the "Compile Sources" phase and click on the '+' symbol and add your framework. The lexical/preprocessor issue "'SpeechKit/SpeechKit.h' file not found" should now be solved.

Upvotes: 2

mat
mat

Reputation: 41

Another newbie in Xcode here. I also spent a lot of time with this problem. My scenario is the framework was emailed to me by colleague as a zip file.

I unzipped it on windows and copied it to my Mac. Wrong move. I should have unzipped it on the Mac itself. If you are wondering why your "header" is not a folder, then this is your answer.

Upvotes: 4

Spawnrider
Spawnrider

Reputation: 1773

I had the same issue. Your Header symbolic link is corrupted (others too), you must replace it by a valid Symlink.

You can use ln -s command on each Symlink of your framework or use my script available here : https://gist.github.com/spawnrider/6088294#file-fix_symlinks_fmk_ios-sh

Upvotes: 8

Tomte
Tomte

Reputation: 1339

The right answer is, that you have to make sure that the files are compiled right. In my case i had to download the SDK/Framework of my choice again.

  1. Delete all files of speechkit in the Project and from the disk
  2. Download it again from your Source
  3. Add it to your project
  4. Make sure you link the Framework (Build Phases->Link Binary with Libraries)

That should make it. I don´t know why it was not compiled proper. But as i followed the steps above, the Framework was compiled right and the Project was built.

Upvotes: 2

Related Questions