I'm currently working in an Healthcare Application, which requires to track user step count as they walk holding their phone. I have made use of CoreMotion
framework and CMPedometer
to track step count and it works fine. However, the callback function won't call for every step count. It clubs all data and returns the step count as 10 Steps (for example) on the whole. To be specific,
startUpdates(from start: Date,
withHandler handler: @escaping CMPedometerHandler)
is not getting called for every step count (for stepcount 1, stepcount 2, etc). It clubs the data and gets called only once by adding the total step count.
Is there a way to call the method for every walking step?