Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display names of HealthKit types

I was exploring the HealthKit APIs and was surprised not to find a method like name on HKObjectType, HKSampleType, HKQuantityTypeIdentifier, or HKQuantityType.

Is there not a way in HealthKit to return a localized display name of a quantity like HKQuantityTypeIdentifierDietaryThiamin, so that 3rd party apps use the same strings to represent types as the Health app does?

For instance, convert the quantity type identified by HKQuantityTypeIdentifierBodyMassIndex to the localized human-readable string "Body Mass Index" as Apple does in the Health app.

Should we translate these medical terms ourselves at our own discretion?

like image 911
Steveo Avatar asked Sep 29 '14 16:09

Steveo


1 Answers

As far as I know, at the moment HealthKit (as for iOs 8.0.2) don't have a direct API for such a thing. Basically it is the developer responsibility to localize the name of a sample type as well as the units. (though there are associated tools to localize the units).

like image 111
goldengil Avatar answered Oct 04 '22 21:10

goldengil