简体   繁体   中英

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?

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"

我想你是在说明你是从JSON文件夹导入JSON.h,从你的描述中听起来你没有文件夹中的那些......

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM