I pull many data from HealthKit including nutritious, workouts, body mass, weight, height. I can get them all without any problem but what I want to do is to get those data's units as well. For example, if the user uses height property in meter or the inch or any other metric unit. I am doing in this way
it gives the right height number but if the user uses in inch unit I still display it in meters. How can I pull units as well for the appropriate property?
Code:
lastHeight = [quantity doubleValueForUnit:[HKUnit meterUnit]];