I understand that NSNumber cannot go beyond 1/10ths place. What can I use as an alternative to add a doubles (longitude/latitude) into Core Data? Using double directly does not work and NSNumber truncates the value.
NSManagedObject *newManagedObject = [NSEntityDescription
insertNewObjectForEntityForName:[entity name]
inManagedObjectContext:managedObjectContext];
if ([locObj valueForKey:@"latitude"] != NULL) {
NSNumber *latitude = [NSNumber numberWithInt:[[locObj valueForKey:@"latitude"] doubleValue]];
[newManagedObject setValue:latitude forKey:@"latitude"];
}
if ([locObj valueForKey:@"longitude"] != NULL) {
NSNumber *longitude = [NSNumber numberWithInt:[[locObj valueForKey:@"longitude"] doubleValue]];
[newManagedObject setValue:longitude forKey:@"longitude"];
}