[objective-c] How to convert an NSString into an NSNumber

If you know that you receive integers, you could use:

NSString* val = @"12";
[NSNumber numberWithInt:[val intValue]];