More Premium Hugo Themes Premium React Themes

React Native Fitness

A React Native module to interact with Apple Healthkit and Google Fit.

React Native Fitness

A React Native module to interact with Apple Healthkit and Google Fit.

Author Avatar Theme by ovalmoney
Github Stars Github Stars: 359
Last Commit Last Commit: Jun 12, 2021 -
First Commit Created: Feb 24, 2024 -
React Native Fitness screenshot

Overview

react-native-fitness is a library that enables interaction with Apple Healthkit and Google Fit on both iOS and Android platforms. It provides APIs to read steps count or distance count for a specified time period. The library is open for contributions in the form of new features or enhancements.

Features

  • Cross-Platform Compatibility: Works on both iOS and Android.
  • Access Apple Healthkit and Google Fit: Interact with health data from both platforms.
  • API for Fitness Data: Provides APIs to retrieve steps count and distance count.

Installation

  1. Getting started

    npm install @ovalmoney/react-native-fitness --save
    

    or

    yarn add @ovalmoney/react-native-fitness
    
  2. Automatic installation for iOS

    • Add to Podfile:
      pod 'libreact-native-fitness.a'
      
    • Run pod install in iOS project directory.
    • In Xcode, select project, go to Build Phases ➜ Link Binary With Libraries, and add libreact-native-fitness.a.
    • Add necessary permissions to Info.plist.
  3. Manual installation for iOS

    • In Xcode, right click Libraries ➜ Add Files to your project ➜ Add RNFitness.xcodeproj.
    • Go to Build Phases ➜ Link Binary With Libraries, add libRNFitness.a.
    • Run the project.
    • Turn on Health Kit in Capabilities.
  4. Android Installation

    • Obtain OAuth 2.0 Client ID.
    • Add RNFitnessPackage to MainApplication.java.
    • Include necessary lines in android/settings.gradle and android/app/build.gradle.

Summary

react-native-fitness is a versatile library that allows developers to integrate fitness data from Apple Healthkit and Google Fit into their React Native applications. With clear installation guides and key features like cross-platform compatibility and access to fitness APIs, it provides a valuable tool for health and fitness app development. Developers can further contribute to the library by submitting new features or improvements through PRs.