lucaspbordignon / rn-apple-healthkit

A React Native package for interacting with Apple HealthKit
https://www.npmjs.com/package/react-native-health
MIT License
520 stars 298 forks source link

StepCount receiving "Unknown error from a native module" #128

Open winardis opened 4 years ago

winardis commented 4 years ago

Hi first of all thank you for the package, it's good but i ran into a issue when retrieving user's step counts with the latest version of rn-apple-healthkit v0.7.3 i'll attach what i received on my end and what code i'm running

"dependencies": { "react": "16.9.0", "react-native": "0.61.4", "react-native-touch-id": "^4.4.1", "rn-apple-healthkit": "^0.7.3" }

Screen Shot 2019-12-05 at 5 00 07 PM

Screen Shot 2019-12-05 at 4 59 40 PM
sstimac commented 4 years ago

@winardis I used to get the same error on my simulator, which was happening because i had no steps data on my simulator yet... This should probably be handled a bit better, bit it shouldn't happen on a real device ( if you're also seeing this on simulator ).

You can easily circumvent by entering some manual step data from within the Health app.