I'm getting this crash, but, in my code I am using a string. I've been working on this one piece of code for 2 hours now and I just can't see what I'm missing! Any ideas?
NSString *codeR = [NSString stringWithFormat:@"%@", [[object objectForKey:@"code"] stringValue]];
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0x181cf0'
Get rid of silly redundancy, see what happens.
NSString *codeR = [[object objectForKey:@"code"] stringValue]; // mysterious missing code if ([coreR isEqualToString:@"200"]) // etc
Also, are you sure the error is raised from the
if statement you posted? It could be coming from elsewhere.