React Native version of Mobai Biometric Capture SDK
Installation
-
Use the following command to add the dependency to your package.json file:
npm i @mobaibio/mobai-biometric
-
Run the following command to install the dependency
yarn
iOS
-
The SDK needs to access the camera on the device. A
NSCameraUsageDescription
must be added to the Info.plist for your application. -
Some additions must be added to the podfile for the iOS project in order to integrate the SDK correctly.
-
If
use_frameworks! :linkage => :static
is used then the following must be added to the podfile to ensure dependency is built as a dynamic framework:pre_install do |installer| installer.pod_targets.each do |pod| if ['SwiftProtobuf'].include?(pod.name) def pod.dynamic_framework?; true end def pod.build_type; Pod::BuildType.dynamic_framework end end end end
-
A post install script to enable module stability in the SDK and its dependencies:
post_install do |installer| installer.pods_project.targets.each do |target| if ['MobaiBiometric', 'SwiftProtobuf'].include? target.name target.build_configurations.each do |config| config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' end end end
-
Android
The repository where the MobaiBiometric SDK used by the React Native module is located must be added to the list of repositories.
// build.gradle (Project)
allprojects {
repositories {
maven {
url "https://gitlab.com/api/v4/projects/36441060/packages/maven"
}
}
}
Usage
Please check out the developer documentation for detailed instructions on how to use the library.