I’m having trouble getting the Pedometer from expo (or I’ve tried expo-sensors as well) working on ios. I have it working on an Android, but testing on an iPhone gives the error ‘An error occurred while querying pedometer data’.
I’m currently exporting from Expo but using the expo-sensors version of the Pedometer doesn’t help when I tested it, as then both iOS and Android do not query correctly. It tells me Android does not yet take dates as arguments and I get the same error for iOS. And it does not work on either of the emulators on the Expo docs page either.
https://docs.expo.io/versions/latest/sdk/pedometer/
If there’s something that’s changed could you let me know? I’m using the same syntax as before/as in the docs/below. I’m going to keep looking for a solution.
Pedometer.getStepCountAsync(start, end).then(
result => {
this.setState({ pastStepCount: result.steps });
}