How can I convert a NSString containing a number of any primitive data type (e.g. int, float, char, unsigned int
NSString
int
float
char
unsigned int
I know this is very late but below code is working for me.
Try this code
NSNumber *number = @([dictionary[@"keyValue"] intValue]]);
This may help you. Thanks