react-native-fitness: TypeError: _reactNativeFitness.default.requestPermissions is not a function.
I tried to use this app in iOS like this
componentDidMount() {
Fitness.requestPermissions()
.then((authorized) => {
alert("authorized");
//Do something
})
.catch((error) => {
//Do something
});
}
But I’m getting this error.
TypeError: _reactNativeFitness.default.requestPermissions is not a function.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 35 (15 by maintainers)
@emil-alexandrescu No. Yet to implement the feature in my app.
@scerelli when I try to do this
const authorized = await Fitness.requestPermissions();
authorized is coming as false and getSteps is givingnull reference
. This is in android.@praveen7557 Did you figure out this issue? I am getting exactly the same issue on Android.
it’s written here dude: https://developers.google.com/fit/android/get-api-key#find_your_apps_certificate_information
read it till the end pls
Ok let me investigate this, i’ll get back to you asap.
I am using RN 0.60.0