ReactNative SDK 4.6.2
Sample Code
The quickest and simplest way to kickstart your journey with the ReactNative SDK is by downloading and experimenting with our full-featured sample code:
IMPORTANT
In the above sample codes, the strings __YOUR_USER_ID__ and __YOUR_API_KEY__ should be replaced by your own User ID and API Key repectively. Please contact us to obtain your User ID and API Key.
Installation
In your ReactNative project, install the SDK with the npm install or yarn add commands.
npm install "https://sdk.panoptic.ai/npm/react-native-vital-sign-plugin-4.6.2.tgz"yarn add "https://sdk.panoptic.ai/npm/react-native-vital-sign-plugin-4.6.2.tgz"Project Integration (for iOS)
IMPORTANT
This version of the SDK requires targeting iOS 15.5 or above. If targeting iOS 12, please use SDK version 3.8.x.
Update pod's config
Some dependencies do not support the ARM simulator on Apple Silicon machines. Additionally, React Native's script may incorrectly set the deployment target for certain pods. Please update your Podfile as follows to address these issues:
post_install do |installer|
# ...
# Add the following to your Podfile
installer.pods_project.targets.each do |target|
# Use x86 simulator
target.build_configurations.each do |config|
config.build_settings['ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
end
end
endCamera Permission
When developing for iOS, you need to allow the app to use the camera by specifying the following in the file Info.plist:
<key>NSCameraUsageDescription</key>
<string>Use for measuring vital signs</string>TIP
In Info.plist, the string "Use for measuring vital signs" is an example description of the camera usage. You should specify your own description that matches the usage of your application.
Xcode 26.4 Compatibility
IMPORTANT
This SDK version targets React Native 0.83 or later. The sample app is built with React Native 0.83.5.
If you are using React Native earlier than 0.83 and building with Xcode 26.4+, you may encounter a build error related to the fmt pod:
error: call to consteval function 'fmt::basic_format_string<...>' is not a constant expressionTo resolve this on React Native < 0.83, add the following post_install hook to your ios/Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'fmt'
target.build_configurations.each do |config|
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
end
end
end
# ... your existing post_install code ...
endThen run:
cd ios
rm -rf Pods Podfile.lock
pod installFor more details, see this Stack Overflow discussion.
Project Integration (for Android)
IMPORTANT
Please note that for Android, the minimum SDK version must be at least 24.
Update the android/app/build.gradle file:
android {
// ...
// Add the packaging options
packagingOptions {
pickFirst '**/*.so'
}
}
dependencies {
// Add the following dependencies.
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation files('../../node_modules/react-native-vital-sign-plugin/android/libs/vital-sign-engine-debug.aar')
// ...
}In android/gradle.properties, add:
kotlinVersion=1.8.0
newArchEnabled=falseCamera Permission
When developing for Android, you need to allow the app to use the camera by specifying the following in the file AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />What's new
4.6.2 (14-May-2026)
- Build System Fixes: Removed
codegenConfigfrompackage.jsonandcom.facebook.reactplugin fromandroid/build.gradleto eliminate CMake autolinking errors and transitive codegen conflicts when installing the SDK via npm. - Android Compatibility: Sample apps now build correctly when the SDK is installed as an npm dependency.
- iOS Compatibility: Resolved codegen
"Invalid library type"error duringpod installwhen operating under the new architecture. - No API or integration changes are required for existing 4.6.x adopters.
4.6.1 (13-May-2026)
- Core Library Updates: Bundled native cores updated from iOS 5.15.14 to 5.15.15 and from Android 5.9.4 to 5.9.5.
- Additional Changes: Refreshed the bundled native core artifacts via
yarn updateCore. - No ReactNative API or integration changes are required for existing 4.6.x adopters.
4.6.0 (13-May-2026)
- API Changes: Added
getLastRequestV2()andgetLastResponseV2()to theVitalSignCamerainstance API for V2 debugging workflows - Core Library Updates: Bundled native cores updated to iOS 5.15.14 and Android 5.9.4 with improvements including safer encrypted response handling, frame collection analysis, and Android CameraX compatibility
- Bundled Video Scan: Added a new bundled video scan sample flow (
example5) demonstrating headless video file scanning - Camera Lifecycle Fixes: Fixed active camera view handling on Android to prevent stale camera instances after navigation
- Sample App Migration: Updated the sample application to React Native 0.83.5, fixing Xcode 26.4 build compatibility via
fmtupgrade to 12.1.0 - Android Build Improvements: Fixed sample app Android build configuration for current React Native dependency compatibility
- V1 Backend Deprecation: V1 backend support is deprecated and will be removed on June 30, 2026. Please migrate to V2.