Health App displays a Watch icon when the source was an Apple Watch.
I'd simply like to get the same information that the Health App is using to determine the type of source. HKSource doesn't seem to provide that.
since iOS 9, samples of type HKSample
have the property device
of type HKDevice
.
https://developer.apple.com/library/prerelease/ios/documentation/HealthKit/Reference/HKDevice_ClassReference/index.html
HKDevice
tells you everything about the source device of the sample.
HKDevice.model
describes the hardware type. At the time of writing, Apple does not document what values Apple uses in HKDevice.model
. In my experiments, I found values "iPhone" and "Watch".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With