I'm building an iOS app in which I need to save the timestamp of each step that the user makes. Im using CoreMotion CMPedometer, but the method startUpdates only outputs the total number of steps that the user did from a start time to a end time.
The workaround I am using is: in every block of returned steps I use the startDate and endDate, and calculate the number of seconds per step, and them set the timestamp of each step in a linear way using the seconds per step. Then, I set the next startDate equal to the endDate of the previous block. But this is not near precise, since no blocks are returned when there is no activity, resulting in wrong results.
Is there anyway I can get the exact step times? Or at least a more precise way?