Skip to main content

Project requirements

iOS

Applies also to Flutter and React Native projects.
If you are integrating on React Native or Flutter, or integrating on Native iOS via CocoaPods, make sure you have updated the minimum iOS deployment target in:
  • your Podfile; and
  • your iOS App Target.
Podfile

Android

Applies also to Flutter, React Native and Expo projects.

Flutter

React Native

Expo

Bare React Native projects

Set up package dependencies

iOS

Junction 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:

Android

Make sure Maven Central is included in the list of repositories in your build.gradle.
Then include our Android SDK artifacts as dependencies of your modules as needed:
Samsung Health also requires the downloaded Samsung Health Data SDK AAR to be wired into your Android root project via samsungHealthAarPath (Native Android / bare React Native) or samsungHealth.aarPath (Expo config plugin). Check out the Samsung Health guide for more details.

React Native

Expo projects

Installation
Only Expo Prebuild is supported. Expo Go is incompatible, since it supports neither native library binaries, nor Expo Config Plugin.
First install the package with npx expo install.
After installing the Junction React Native SDK packages, add the bundled Junction Expo Config Plugins to the plugins array of your Expo app configuration file (app.json or app.config.js):
app.json/app.config.js
Android specific configuration
In your Expo app configuration file (app.json or app.config.js), use the expo-build-properties config plugin to customize the minimum, target and compile Android SDK version:
app.json/app.config.js
Refer to Project Requirements > Android for the constraints on these SDK version levers.
Next, rebuild your app as described in the “Adding custom native code” guide.
Customizations
You can customize the integration by passing additional properties to the Expo config plugin:
app.json/app.config.js
After making changes to your Config Plugin settings, you must re-run Expo Prebuild to re-generate your iOS and Android projects.

Bare React Native projects

Install Junction SDK packages through NPM or Yarn:
Pull all dependencies for your React Native iOS project:
pod install on your iOS project might error due to version lock conflicts on the Junction iOS libraries. This usually happens after you have bumped the React Native SDK package versions.Use pod update to resolve the conflict:

Flutter

Add Junction SDK packages to your pubspec.yaml:
pod install on your iOS project might error due to version lock conflicts on the Junction iOS libraries. This usually happens after you have bumped the Flutter SDK package versions.Use pod update to resolve the conflict: