Reputation: 3582
If I am accessing a user's weight (or any other HKQuantitySample
), how can I determine what unit the user originally stored the weight in?
Which HKUnit
was used to create the HKQuantity
?
Upvotes: 3
Views: 438
Reputation: 7363
HealthKit does not expose the original unit that was used when the sample was saved. However, if you'd like to display the quantity in the unit that the user prefers for samples of that type I'd recommend checking out the documentation for the preferredUnitsForQuantityTypes:completion:
method on HKHealthStore
.
Upvotes: 5