helloB
helloB

Reputation: 3582

How to determine original unit HKQuantitySample was stored in?

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

Answers (1)

Allan
Allan

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

Related Questions