1

When i build i got that error:

JSON.h : File not found

Obvious assumptions make me think that the JSON.h file is not in the framework folder imported into my project, yes, it doesn't exist with that noun but there is a file named SBJson.h. I have followed this step by step tutorial around.

Malloc
  • 15,434
  • 34
  • 105
  • 192
  • No one can answer this. What framework did you import? Why do you think it should have a JSON.h? – bmargulies Dec 26 '11 at 13:12
  • I have downloaded it from github https://github.com/stig/json-framework/downloads – Malloc Dec 26 '11 at 13:13
  • 2
    Then please edit your question to say, 'I downloaded this framework {url}, I followed this tutorial {url}...' Otherwise you are asking for mind-reading. – bmargulies Dec 26 '11 at 13:15

1 Answers1

6

Remove the JSON folder from your project and then re-add it.

When you re-add it, make sure the "Create groups for any added folders" radio button is checked. If the other "Create folder referenes..." button is selected, it will only create a folder reference and Xcode won't know about the contents of that folder (i.e. Xcode won't "see" JSON.h).

select the correct folder option

And the resulting folder should look like this:

JSON.h should be resolvable by Xcode (note the yellow color of the folder, indicating the "folder" is really a group)

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • 2
    Hi Michael, i think the author of the framework has announced that the `JSON.h` file is deprecated and it's replaced by `SBJson.h`, try to check out and please correct me if i am wrong. Go to github https://github.com/stig/json-framework/downloads and download an old package (example: SBJson_v3.0.4.zip), decompress it and open the `JSON.h` file in the classes folder, you can read this comment: `warning The JSON.h header is deprecated, and will disappear in a future release. Please change to include SBJson.h instead.` – Malloc Dec 26 '11 at 13:37
  • 1
    if you change to import SBJson.h, is your problem solved? Makes sense about a major update to the SBJson library -- all the "errors" in my screenshots above are from ARC incompatibilities. – Michael Dautermann Dec 26 '11 at 13:39
  • I have solved the ARC incompatibilities, i needed to add the `-fno-objc-arc` flag to the flag compiler of each file doesn't have compatibility with the ARC. Returning to `SBJson.h`, i am currently developing a web service and will test it soon, i will let you know either it works or no. – Malloc Dec 26 '11 at 13:50
  • Hi again Michael, it works with the `SBJson.h`, so this file obviously replace the `JSON.h`file, thanx for your continuous help :) – Malloc Dec 26 '11 at 15:54