I am trying to convert a NSNumber to long but I get this error:
[__NSSingleObjectArrayI intValue]: unrecognized selector sent to instance
Here is my code:
NSNumber *dbversion = [settings valueForKey:@"Version"];
long dbver = [dbversion longValue];
What am I doing wrong here?
*settings is a NSArray and "Version" is the key for a long value.
See Question&Answers more detail:os