The following chart lists my step data from HealthKit vs. the CMPedomoter class:
HealthKit CMPedometer difference
1 2710 2681 -29
2 2569 2580 11
3 2367 2312 -55
4 1326 1311 -15
5 2728 2711 -17
6 860 886 26
7 6293 6299 6
There is a slight difference each day between the two. Does anyone know why this might be the case? No other app is writing step data currently to this device.
HealthKit is the developer framework behind it that allows apps to work with Apple Health and each other. If you're confused about how the Apple Health app works, what type of information you need to get the most out of it, and which apps are compatible, keep reading.
To quote: This data is stored in Data Protection class Protected Unless Open. Access to the data is relinquished 10 minutes after device locks, and data becomes accessible the next time user enters their passcode or uses Touch ID or Face ID to unlock the device.
HealthKit provides a central repository for health and fitness data on iPhone and Apple Watch. With the user's permission, apps communicate with the HealthKit store to access and share this data.
Problems is that all steps has Float value so for example in real could be:
time - pure data - after round
1:05 - 0.95 steps - 1 steps
1:15 - 1.25 steps - 1 steps
1:25 - 14.75 steps - 15 steps
1:45 - 1.95 steps - 2 steps
2:05 - 4.65 steps - 5 steps
2:15 - 11.25 steps - 11 steps
and if you sum it like integer you will get 31 steps and if you round it before you will get 35
also had this issue when synch data from pedometer and health kit
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