CMPedometerData exposes a few other fields that would be incredibly valuable to a lot of devs, including distance and currentPace. Why did we choose to limit this to just number of steps?
When we authored the module we likely went for core functionality to be able to get it out in a timely manner for release. I would recommend creating a feature request to expose these additional fields on our Canny Board.
Updating should be as simple as changing this file, ‘expo/ABI35_0_0EXPedometer.m at 1844c78d3815558378f201c78554598968e24773 · expo/expo · GitHub’, and changing ‘body:@{@“steps”: pedometerData.numberOfSteps}]’ to just '‘body:@{@“pedometerData”: pedometerData}]’ and ‘resolve(@{@“steps”: pedometerData.numberOfSteps});’ to ‘resolve(@{@“pedometerData”: pedometerData});’.
@adamjnav If I submitted a pull request for the feature change, would you be able to review this week and merge?
Could go about it in three ways, let me know what Expo prefers.
Alter the current Pedometer module, exposing all of the fields. (May alter applications currently using the Pedometer as is)
Alter the current Pedometer to return number of steps in the same manner (applications currently using this module will be unaffected), but also include the other fields in a similar fashion.
Create a new Module that returns all of the fields, and leaves the current Pedometer unchanged.
Let me know! Very close to finishing an application that requires this, so glad to just get this work done.