Search code examples
iosselectorsbjson

ios unrecognized selector


Possible Duplicate:
-[__NSCFDictionary JSONRepresentation]: unrecognized selector sent to instance

I use SBJson ( http://stig.github.com/json-framework/ ) in two of my project. Therefore I downloaded the code and copied it into my first project so that I can do something like this

NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
[dict setValue:email  forKey:@"email"];
[dict setValue:password forKey:@"password"];
NSString* json = [dict JSONRepresentation];

Now for my second and new project I did the same. I copied all the source files from SBJson into my new project and used the exact same code as above. But now when the program comes to line NSString* json = [dict JSONRepresentation]; I get the following error message:

-[__NSCFDictionary JSONRepresentation]: unrecognized selector sent to instance 0x689c710

What am I doing wrong in my second project?


Solution

  • Make sure that all the files have been added to the target.