Face API is a framework that is used for face matching, recognition and liveness detection.
- Download or the clone current repository using the command
git clone https://github.com/regulaforensics/react-native-face-api.git. - Run the following commands within the root directory:
$ cd example
$ npm install
$ cd ios
$ pod installNote: make sure that Metro Bundler is running when you run your app. Otherwise, run npx react-native start command. If it fails to start, run git init from Project root, then npx react-native start.
- Android:
- Run
npx react-native run-androidinsideexamplefolder - this is just one way to run the app. You can also run it directly from within Android Studio.
Note: if the running failed with the following error Error: spawn ./gradlew EACCES, try to run the following command chmod +x gradlew within the example/android directory.
- iOS:
- Run
npx react-native run-iosinsideexamplefolder - this is just one way to run the app. You can also run it directly from within Xcode.
- Place a license that supports offline match at
android/app/src/main/assets/regula.licenseandios/license/regula.license. - Change android and iOS bundle id if required by your license with the following commands(replace
ANDROID_IDandIOS_IDwith actual ids):
git init
npx react-native-rename@latest "FaceApi" --androidBundleID "ANDROID_ID" --iosBundleID "IOS_ID" --skipGitStatusCheck- Change core with the following commands:
npm uninstall @regulaforensics/react-native-face-core-basic
npm install @regulaforensics/react-native-face-core-match- Turn off the internet and run the app.
You can find documentation on API here.
If you have any technical questions, feel free to contact us or create issues here.