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)

Most upvoted comments

@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 giving null reference. This is in android.

@scerelli when I try to do this const authorized = await Fitness.requestPermissions(); authorized is coming as false and getSteps is giving null reference. This is in android.

@praveen7557 Did you figure out this issue? I am getting exactly the same issue on Android.

Ok let me investigate this, i’ll get back to you asap.

I am using RN 0.60.0