AndrewDongminYoo / react-native-step-counter

[리액트 네이티브 라이브러리] 사용자의 걸음 수를 계산합니다. Android는 StepCounter (or Accelerometer) 센서 API를, iOS는 CoreMotion CMPedometer 를 사용하여 걸음 수를 측정합니다.
https://andrewdongminyoo.github.io/react-native-step-counter/
MIT License
29 stars 10 forks source link

iOS's RNStepCounter (Pedometer Module) is too occasionally updating #7

Closed AndrewDongminYoo closed 1 year ago

AndrewDongminYoo commented 1 year ago

While Android's pedometer is updated every time the number of steps changes, iOS's data on pedometer changes steadily, but the interval between events is relatively long.

startStepCounterUpdate

AndrewDongminYoo commented 1 year ago

Apple의 공식 문서에서는 CMPedometer의 업데이트 간격을 조정할 방법은 커녕 실제 딜레이 시간이 얼마나 되는지, 걸음 수의 기준인지 시간 기준인지 등 어떤 정보도 제공하지 않는다. 일부 iOS 개발자들은 개별 테스트를 통해 CMPedometer가 최소 8-10걸음 이상 걸은 후에야 업데이트가 시작되며, 이후에는 3~5걸음마다 업데이트된다고 보고 있다. 하지만 공식적인 정보가 아니므로 실제 업데이트 간격은 다를 수 있다. 따라서 코어 모듈 만보계(아마 다른 센서 이벤트들도 마찬가지일 것 같다.)의 정확한 업데이트 간격은 조절할 수 없을 뿐 더러 공식적인 기준도 알 수 없다. Apple의 공식 문서에서도 이에 대한 정보를 제공하지 않기 때문이다. 따라서 이 이슈는 해결될 수 없고, 우회적인 방법으로 성능 개선을 해야 할 것으로 보인다.