Project requirements

iOS

Applies also to Flutter and React Native projects.
ParameterRequirement
Minimum deployment targetiOS 14.0

Android

Applies also to Flutter and React Native projects.
ParameterRequirement
Minimum SDK Level26
Compile SDK Level34
Kotlin compiler version1.8.22 or above
Android Gradle Plugin version8.2.0 or above
Gradle version8.2.0 or above

Flutter

ParameterRequirement
Flutter SDK3.13 or above

React Native

ParameterRequirement
React Native Core0.72.0 or above
Node.js18.0 or above

Setup package dependencies

iOS

Vital Mobile SDKs are available through both Swift Package Manager and CocoaPods.

Swift Package Manager

Add the vital-ios package (https://github.com/tryVital/vital-ios) as a dependency of your project.

Link VitalHealthKit and VitalDevices as appropriate. Note that VitalCore is mandatory.

CocoaPods

Add the following declarations to your app target in your Podfile:

pod 'VitalCore'
pod 'VitalDevices'
pod 'VitalHealthKit'

Android

You can install the Vital SDK by adding the followings to your build.gradle file:

repositories {
  ...
  maven { url 'https://jitpack.io' }
}
implementation 'com.github.tryVital.vital-android:VitalClient:$vital_version'
implementation 'com.github.tryVital.vital-android:VitalHealthConnect:$vital_version'
implementation 'com.github.tryVital.vital-android:VitalDevices:$vital_version'

Replace $vital_version with the latest version of the SDK. You only need to add the dependencies for the components you want to use.

React Native

Install Vital SDK packages through NPM or Yarn:

npm install @tryvital/vital-core-react-native
npm install @tryvital/vital-health-react-native
npm install @tryvital/vital-devices-react-native

Pull all dependencies for your React Native iOS project:

cd ios
pod install

pod install on your iOS project might error due to version lock conflicts on the Vital iOS libraries. This usually happens after you have bumped the React Native SDK package versions.

Use pod update to resolve the conflict:

pod update VitalCore VitalDevices VitalHealthKit --repo-update

Flutter

Add Vital SDK packages to your pubspec.yaml:

dependencies:
  vital_core: ^3.1.1
  vital_health: ^3.1.1
  vital_devices: ^3.1.1

pod install on your iOS project might error due to version lock conflicts on the Vital iOS libraries. This usually happens after you have bumped the Flutter SDK package versions.

Use pod update to resolve the conflict:

pod update VitalCore VitalDevices VitalHealthKit --repo-update