This seems like a simple-stupid thing, but I can't get it to work. Here's the flow:
Download and unzip the json-framework package from GitHub. Create a new standard, Single View Application with XCode. Make a new group named 'JSON' in my project. Make a directory in my project directory named 'JSON', and copy the files from 'json-framework-master/Classes/*' into this directory. In the XCode project, drag the files I just copied into the 'JSON' group I created. The files are successfully added to the project. In my code, I add at the top:
#include "SBJSON.h"
in the app delegate launch method, I add this:
NSDictionary *myDict = [NSDictionary dictionaryWithObject:@"Hi" forKey:@"There"];
NSString *myString = [myDict JSONRepresentation];
This is just a simple test to make sure JSON is working correctly. Everything builds and compiles fine, but I get this error:
-[__NSDictionaryI JSONRepresentation]: unrecognized selector sent to instance 0x1d537b20
I even tried adding the '-all_load' linker flag to both the project and the target, but that does nothing. I am building on an iPhone 5 with iOS 6.0.
Also I know that iOS5+ includes native JSON support, but I need to support older versions as well.
You should try to use JSONKit instead of SBJSon.
you should also try to work with Cocoapods for theses kind of dependencies, and setup issues