Configuring SBJSON-framework for XCode 4.2

Procedure to use json-framework in XCode 4.2

1) Open or create your project
2) Open the SBJSON XCode project file “SBJson.xcodeproj

pastedgraphic 1

 

Now drag the SBJson application to you project. There seems to be a bug in the XCode I am using in that it does not display as shown below. Close the project and open it again and it will work.

 

Now strap it in.

Click on your project file
Click the Targets section
Click the Build Phases

Expand target Dependencies
Click the “+” to add a dependency
Choose “sbjson-ios” under the SBJson project

Now expand the “Link Binary with Libraries”, click + and add “libsbjson-ios.a”

That’s it. All done

About these ads

10 Comments

  1. The sbjson app won’t show as an app no matter how many times I close xcode and reopen it. Any ideas?

    • Nope, this seems to be a bug. I even created a new project once to overcome it

      HTH
      Des

  2. OK… after i do this and remove just my class files, I get an error in my import statement:

    #import “SBJsonParser.h”

    “file not found”. How do i go about importing the library into a single .m file?

  3. Nevermind. Got the answer here: http://stackoverflow.com/questions/5543854/xcode-4-cant-locate-public-header-files-from-static-library-dependancy

    Just had to drag the headers into MY project and not link them to the target.

  4. If you follow the logic detailed here:
    https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
    then it will work OK.

  5. Excellent!
    Adding JSON to my apps has always been too painful. Found this while looking for a better idea. Easy Peasy!

  6. how to get the json object reference

  7. Hi! I could have sworn I’ve been to this site before but after browsing through some of the post I realized it’s new
    to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back often!

  8. Copy the SBJSON folder into your project from finder.
    Right click on project navigator to add files
    add the sbjson project, rest is all explained here well


Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.