objective c - Where does HealthKit read the default units? -
i know health.app read unit weight. mine set kg i'm not able find alternative toggle this. healthkit framework supports multiple units weight: kilogram, gram, ounce, pound , stone.
i'd know if there's api current health.app weight unit can straight utilize unit in app too.
any idea?
update: in latest ios 8.2 beta, there new api -[hkhealthstore preferredunitsforquantitytypes:completion:] allows applications access user's preferred units hkquantitytype app authorized read or write.
the health app uses different units different types depending on locale set device. instance in united states of america pounds used display weight in locales utilize metric scheme kilograms used instead. starting in ios 8.2, user may specify unit prefer many quantity types in health app.
objective-c iphone xcode ios8 health-kit
No comments:
Post a Comment