Install json-framework

August 5, 2008    JSON Programming

If you are attempting to write a Iphone application to talk to a webservice, JSON is one of the best ways to go. Now unfortunately there is no native support in the Iphone SDK for JSON. There is a project called json-framework that provides a framework called json-framework.

There is little documentation on how to install it though. Recently I found a news group posting on how to do it along with a dmg! I have mirrored the dmg file just in case it gets removed from that posting.

So here are some instructions on how to install it.

  • Download the dmg file
  • Make a directory called SDKs in your ~/Library/ directory. So if you username is bob. it would be /Users/bob/Library/SDKs
  • Copy the JSON directory to SDKs so you should have a directory called /Users/bob/Library/SDKs/JSON which has iphoneos.sdk and iphonesimulator.sdk directories inside it.
  • In Xcode load up your project and go to Project -> Edit Project Settings. You will see a box like this

  • At the top you will see Additional SDKs. Double click that and you will see

  • Now click the + sign and it will prompt you to add a directory. You will enter the following line
  • Now you need to add in the linker options. So now look for Other Linker Flags and add in the following
-ObjC -ljson
  • Now you can import the header file and begin coding.

I have also mirrored their test application they built in the news group post. So if you download that and make the project changes there, you should be able to compile touchJSON into your application.

comments powered by Disqus