views:

518

answers:

1

I've downloaded the JSON framework DMG from http://code.google.com/p/json-framework/downloads/list. I followed Option 3 here: http://code.google.com/p/json-framework/wiki/InstallationInstructions. For the copy files build phase, I set path to ~/Library/Frameworks/JSON.framework. Buid failed. I then tried setting it to my project root. Build failed.

I keep getting this error:

<JSON/JSON.h>: No such file or directory

Any suggestions?

+4  A: 

There's no need to put the framework in Library, at least under Xcode 3.1.3. Here's what you do:

  1. Put the JSON framework source tree in your source tree.
  2. Add the framework project to your project.
  3. Get Info on your target, click + under the Direct Dependencies list, and choose the framework target from the framework project.
  4. Right-click on your target in the group tree and choose “New Build Phase▶ Copy Files”. In the window that results, choose Frameworks as the destination.
  5. Add the framework target (which will transmogrify into its build product) to the Copy Files phase.
  6. Add the framework target (which will transmogrify) to your target's Link with Libraries phase.
Peter Hosey
4thSpace
I've clarified my instructions. As for step 2: Yes there is.
Peter Hosey
Thanks. I went with Option 1 from above link and it worked fine.
4thSpace