Tom
Tom

Reputation: 371

Importing Objective-C JSON Framework in Xcode 4

The instructions for installing the JSON Framework seem to be for older versions of Xcode. I'm relatively unfamiliar with Xcode and I can't figure out how to properly import the framework into my project. I selected all of the files in the "Classes" folder (JSON.h, NSObject+JSON.h, etc.) that comes in the download, dragged them into the main area of my project, and added #import <JSON/JSON.h> to my ViewController's .h and .m files, and I get a No such file or directory error for JSON/JSON.h

What am I doing incorrectly here?

Upvotes: 1

Views: 7434

Answers (2)

user557219
user557219

Reputation:

If you’ve placed the files under the Classes group and haven’t taken any further action, they’re at the root of your project directory. As such, import it as

#import "JSON.h"

Upvotes: 3

Robot Woods
Robot Woods

Reputation: 5687

I think you're indicating that you're importing JSON.h from the JSON folder, and it sounds from your description you don't have those in a folder...

Upvotes: 1

Related Questions