Reputation: 1741
The value coming in the NSString is in brackets due to which string comparision getting failed and lead to crash. Below is the value coming in NSString.
strId:(
17
), strCID:5
I am trying to compare the above two strings following with error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '- [__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0xa357130'
Please guide for above what is wrong.
Upvotes: 1
Views: 56
Reputation: 56625
Because it is not a string, it's an array that contains a single element which is a string.
You can also see that the receiver of that message is of the class __NSArrayI
which is a class for immutable arrays in the NSArray class cluster.
Upvotes: 1