@regulaforensics/face-sdk 7.1.210-rc → 7.1.252-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/RNFaceSDK.podspec +3 -3
- package/android/CVDFaceSDK.kt +22 -8
- package/android/build.gradle +1 -1
- package/android/cordova.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +9 -1
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +15 -9
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +16 -6
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +32 -2
- package/examples/capacitor/README.md +3 -8
- package/examples/capacitor/android/app/build.gradle +2 -6
- package/examples/capacitor/android/app/capacitor.build.gradle +4 -4
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +3 -16
- package/examples/capacitor/android/app/src/main/java/com/regula/{faceapi → documentreader}/MainActivity.java +1 -1
- package/examples/capacitor/android/app/src/main/res/values/strings.xml +2 -2
- package/examples/capacitor/android/build.gradle +1 -1
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +2 -1
- package/examples/capacitor/android/gradlew +21 -13
- package/examples/capacitor/android/gradlew.bat +12 -10
- package/examples/capacitor/android/variables.gradle +11 -11
- package/examples/capacitor/index.html +8 -104
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +4 -4
- package/examples/capacitor/ios/App/Podfile +2 -3
- package/examples/capacitor/ios/App/Podfile.lock +57 -0
- package/examples/capacitor/package-lock.json +3536 -0
- package/examples/capacitor/package.json +19 -56
- package/examples/capacitor/public/images/portrait.png +0 -0
- package/examples/capacitor/scripts/setup.sh +2 -0
- package/examples/capacitor/src/main.css +77 -0
- package/examples/capacitor/src/main.html +22 -0
- package/examples/capacitor/src/main.tsx +152 -11
- package/examples/capacitor/tsconfig.json +1 -17
- package/examples/capacitor/vite.config.ts +10 -9
- package/examples/cordova/README.md +4 -6
- package/examples/cordova/config.xml +4 -15
- package/examples/cordova/package-lock.json +1333 -0
- package/examples/cordova/package.json +8 -12
- package/examples/cordova/scripts/setup.sh +4 -1
- package/examples/cordova/www/images/portrait.png +0 -0
- package/examples/cordova/www/index.html +19 -92
- package/examples/cordova/www/src/main.css +77 -0
- package/examples/cordova/www/src/main.html +22 -0
- package/examples/cordova/www/{js/index.js → src/main.js} +41 -43
- package/examples/ionic/README.md +3 -6
- package/examples/ionic/angular.json +6 -154
- package/examples/ionic/config.xml +4 -93
- package/examples/ionic/index.html +19 -0
- package/examples/ionic/index.ts +17 -0
- package/examples/ionic/package-lock.json +13777 -0
- package/examples/ionic/package.json +24 -75
- package/examples/ionic/scripts/setup.sh +4 -1
- package/examples/ionic/src/images/portrait.png +0 -0
- package/examples/ionic/src/main.css +77 -0
- package/examples/ionic/src/main.html +22 -0
- package/examples/ionic/src/main.ts +157 -8
- package/examples/ionic/tsconfig.json +6 -20
- package/examples/react-native/Gemfile +7 -0
- package/examples/react-native/Gemfile.lock +28 -21
- package/examples/react-native/README.md +4 -10
- package/examples/react-native/android/app/build.gradle +2 -70
- package/examples/react-native/android/app/src/main/AndroidManifest.xml +21 -21
- package/examples/react-native/android/app/src/main/java/com/regula/{face/api → documentreader}/MainActivity.kt +2 -2
- package/examples/react-native/android/app/src/main/java/com/regula/{face/api → documentreader}/MainApplication.kt +1 -1
- package/examples/react-native/android/build.gradle +3 -3
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/examples/react-native/android/gradle.properties +0 -34
- package/examples/react-native/android/gradlew +1 -2
- package/examples/react-native/android/settings.gradle +1 -1
- package/examples/react-native/images/portrait.png +0 -0
- package/examples/react-native/index.html +11 -0
- package/examples/react-native/index.tsx +51 -0
- package/examples/react-native/ios/{FaceSDK → App}/AppDelegate.mm +1 -1
- package/examples/react-native/ios/{FaceSDK.xcodeproj → App.xcodeproj}/project.pbxproj +52 -269
- package/examples/react-native/ios/{FaceSDK.xcodeproj/xcshareddata/xcschemes/FaceSDK.xcscheme → App.xcodeproj/xcshareddata/xcschemes/App.xcscheme} +9 -27
- package/examples/react-native/ios/{FaceSDK.xcworkspace → App.xcworkspace}/contents.xcworkspacedata +1 -1
- package/examples/react-native/ios/Podfile +3 -6
- package/examples/react-native/ios/Podfile.lock +565 -512
- package/examples/react-native/metro.config.js +16 -11
- package/examples/react-native/package-lock.json +2121 -6901
- package/examples/react-native/package.json +12 -34
- package/examples/react-native/patches/react-native-webview+13.13.5.patch +36 -0
- package/examples/react-native/scripts/android.sh +5 -0
- package/examples/react-native/scripts/ios.sh +5 -1
- package/examples/react-native/src/main.css +77 -0
- package/examples/react-native/src/main.html +22 -0
- package/examples/react-native/{App.tsx → src/main.tsx} +19 -86
- package/ios/RFSWConfig.m +7 -1
- package/ios/RFSWJSONConstructor.h +2 -0
- package/ios/RFSWJSONConstructor.m +32 -15
- package/ios/RFSWMain.m +1 -1
- package/package.json +1 -1
- package/plugin.xml +4 -4
- package/www/capacitor/detect_faces/detect_faces_request.js +2 -0
- package/www/capacitor/face_capture/face_capture_config.js +6 -2
- package/www/capacitor/image_quality/image_quality_characteristic.js +2 -0
- package/www/capacitor/image_quality/image_quality_group.js +1 -0
- package/www/capacitor/init/init_config.js +8 -0
- package/www/capacitor/internal/bridge.js +8 -7
- package/www/capacitor/liveness/liveness_backend_exception.js +8 -0
- package/www/capacitor/liveness/liveness_config.js +3 -3
- package/www/capacitor/person_database/person_database.js +1 -1
- package/www/cordova.js +109 -80
- package/www/react-native/detect_faces/detect_faces_request.js +2 -0
- package/www/react-native/face_capture/face_capture_config.js +6 -2
- package/www/react-native/image_quality/image_quality_characteristic.js +2 -0
- package/www/react-native/image_quality/image_quality_group.js +1 -0
- package/www/react-native/init/init_config.js +8 -0
- package/www/react-native/internal/bridge.js +8 -7
- package/www/react-native/liveness/liveness_backend_exception.js +8 -0
- package/www/react-native/liveness/liveness_config.js +3 -3
- package/www/react-native/person_database/person_database.js +1 -1
- package/www/types/face_capture/face_capture_config.d.ts +6 -1
- package/www/types/init/init_config.d.ts +7 -1
- package/www/types/liveness/liveness_backend_exception.d.ts +9 -1
- package/www/types/liveness/liveness_config.d.ts +1 -1
- package/www/types/person_database/person_database.d.ts +1 -1
- package/.gitlab/report.yaml +0 -75
- package/.gitlab-ci.yml +0 -49
- package/examples/capacitor/.browserslistrc +0 -6
- package/examples/capacitor/.eslintrc.js +0 -17
- package/examples/capacitor/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
- package/examples/capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/values/ic_launcher_background.xml +0 -4
- package/examples/capacitor/android/app/src/main/res/xml/file_paths.xml +0 -5
- package/examples/capacitor/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
- package/examples/capacitor/capacitor.config.ts +0 -12
- package/examples/capacitor/cypress/e2e/test.cy.ts +0 -6
- package/examples/capacitor/cypress/fixtures/example.json +0 -5
- package/examples/capacitor/cypress/support/commands.ts +0 -37
- package/examples/capacitor/cypress/support/e2e.ts +0 -20
- package/examples/capacitor/cypress.config.ts +0 -10
- package/examples/capacitor/public/assets/img/id.png +0 -0
- package/examples/capacitor/public/assets/img/portrait.png +0 -0
- package/examples/capacitor/public/favicon.png +0 -0
- package/examples/capacitor/public/manifest.json +0 -21
- package/examples/capacitor/src/App.test.tsx +0 -8
- package/examples/capacitor/src/App.tsx +0 -42
- package/examples/capacitor/src/components/ExploreContainer.css +0 -24
- package/examples/capacitor/src/components/ExploreContainer.tsx +0 -14
- package/examples/capacitor/src/pages/Home.tsx +0 -159
- package/examples/capacitor/src/setupTests.ts +0 -14
- package/examples/capacitor/src/theme/variables.css +0 -242
- package/examples/capacitor/src/vite-env.d.ts +0 -1
- package/examples/capacitor/tsconfig.node.json +0 -9
- package/examples/cordova/jsconfig.json +0 -1
- package/examples/cordova/www/css/index.css +0 -107
- package/examples/cordova/www/img/id.png +0 -0
- package/examples/cordova/www/img/portrait.png +0 -0
- package/examples/ionic/browserslist +0 -12
- package/examples/ionic/e2e/protractor.conf.js +0 -28
- package/examples/ionic/e2e/src/app.e2e-spec.ts +0 -14
- package/examples/ionic/e2e/src/app.po.ts +0 -11
- package/examples/ionic/e2e/tsconfig.json +0 -13
- package/examples/ionic/karma.conf.js +0 -31
- package/examples/ionic/resources/README.md +0 -8
- package/examples/ionic/resources/android/icon/drawable-hdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-ldpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-mdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/xml/network_security_config.xml +0 -6
- package/examples/ionic/resources/ios/icon/icon-1024.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-24@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-27.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-44@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-83.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-86@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-98@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon.png +0 -0
- package/examples/ionic/resources/ios/icon/icon@2x.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-568h@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-667h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~universal~anyany.png +0 -0
- package/examples/ionic/resources/ios/splash/Default~iphone.png +0 -0
- package/examples/ionic/resources/splash.png +0 -0
- package/examples/ionic/src/app/app-routing.module.ts +0 -15
- package/examples/ionic/src/app/app.component.html +0 -3
- package/examples/ionic/src/app/app.component.spec.ts +0 -47
- package/examples/ionic/src/app/app.component.ts +0 -27
- package/examples/ionic/src/app/app.module.ts +0 -23
- package/examples/ionic/src/app/home/home.module.ts +0 -29
- package/examples/ionic/src/app/home/home.page.html +0 -75
- package/examples/ionic/src/app/home/home.page.scss +0 -1
- package/examples/ionic/src/app/home/home.page.spec.ts +0 -24
- package/examples/ionic/src/app/home/home.page.ts +0 -166
- package/examples/ionic/src/assets/icon/favicon.png +0 -0
- package/examples/ionic/src/assets/img/portrait.png +0 -0
- package/examples/ionic/src/assets/shapes.svg +0 -1
- package/examples/ionic/src/environments/environment.prod.ts +0 -3
- package/examples/ionic/src/environments/environment.ts +0 -16
- package/examples/ionic/src/global.scss +0 -31
- package/examples/ionic/src/index.html +0 -25
- package/examples/ionic/src/polyfills.ts +0 -66
- package/examples/ionic/src/test.ts +0 -20
- package/examples/ionic/src/theme/variables.scss +0 -77
- package/examples/ionic/src/zone-flags.ts +0 -5
- package/examples/ionic/tsconfig.app.json +0 -14
- package/examples/ionic/tsconfig.spec.json +0 -19
- package/examples/ionic/tslint.json +0 -88
- package/examples/react-native/.watchmanconfig +0 -1
- package/examples/react-native/android/app/proguard-rules.pro +0 -10
- package/examples/react-native/android/app/src/debug/AndroidManifest.xml +0 -9
- package/examples/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/values/strings.xml +0 -3
- package/examples/react-native/android/app/src/main/res/values/styles.xml +0 -9
- package/examples/react-native/app.json +0 -5
- package/examples/react-native/index.js +0 -5
- package/examples/react-native/ios/FaceSDKTests/FaceSDKTests.m +0 -66
- package/examples/react-native/ios/FaceSDKTests/Info.plist +0 -24
- /package/examples/capacitor/android/app/src/main/res/{mipmap-xxxhdpi → drawable}/ic_launcher.png +0 -0
- /package/examples/cordova/www/{img → images}/logo.png +0 -0
- /package/examples/ionic/src/{app/app.component.scss → assets/.gitkeep} +0 -0
- /package/examples/ionic/{resources → src/images}/icon.png +0 -0
- /package/examples/react-native/android/app/src/main/res/{mipmap-xxxhdpi → drawable}/ic_launcher.png +0 -0
- /package/examples/react-native/android/app/src/main/res/{mipmap-xxxhdpi → drawable}/ic_launcher_round.png +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/AppDelegate.h +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/Images.xcassets/Contents.json +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/Info.plist +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/LaunchScreen.storyboard +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/PrivacyInfo.xcprivacy +0 -0
- /package/examples/react-native/ios/{FaceSDK → App}/main.m +0 -0
- /package/examples/react-native/ios/{FaceSDK.xcworkspace → App.xcworkspace}/xcshareddata/IDEWorkspaceChecks.plist +0 -0
|
@@ -1,44 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
2
|
+
"name": "face-sdk",
|
|
5
3
|
"scripts": {
|
|
6
4
|
"setup": "scripts/setup.sh",
|
|
5
|
+
"postinstall": "patch-package",
|
|
7
6
|
"ios": "scripts/ios.sh",
|
|
8
7
|
"android": "scripts/android.sh",
|
|
9
|
-
"
|
|
10
|
-
"start": "react-native start",
|
|
11
|
-
"test": "jest"
|
|
8
|
+
"start": "react-native start"
|
|
12
9
|
},
|
|
13
10
|
"dependencies": {
|
|
14
|
-
"@regulaforensics/face-sdk": "7.1.
|
|
15
|
-
"@regulaforensics/face-core-basic": "7.1.
|
|
16
|
-
"react": "18.3.1",
|
|
17
|
-
"react-native": "0.76.6",
|
|
11
|
+
"@regulaforensics/face-sdk": "7.1.252-beta",
|
|
12
|
+
"@regulaforensics/face-core-basic": "7.1.99-beta",
|
|
18
13
|
"react-native-fs": "2.20.0",
|
|
19
|
-
"react-native-image-picker": "
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"@
|
|
23
|
-
"@babel/preset-env": "^7.26.0",
|
|
24
|
-
"@babel/runtime": "^7.26.0",
|
|
14
|
+
"react-native-image-picker": "8.2.0",
|
|
15
|
+
"react": "19.1.0",
|
|
16
|
+
"react-native": "0.78.1",
|
|
17
|
+
"@react-native/metro-config": "0.78.1",
|
|
25
18
|
"@react-native-community/cli": "15.1.3",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"@react-native/babel-preset": "0.76.6",
|
|
29
|
-
"@react-native/eslint-config": "0.76.6",
|
|
30
|
-
"@react-native/metro-config": "0.76.6",
|
|
31
|
-
"@react-native/typescript-config": "0.76.6",
|
|
32
|
-
"@types/react": "^18.2.6",
|
|
33
|
-
"@types/react-test-renderer": "^18.0.0",
|
|
34
|
-
"babel-jest": "^29.7.0",
|
|
35
|
-
"eslint": "^8.19.0",
|
|
36
|
-
"jest": "^29.7.0",
|
|
37
|
-
"prettier": "2.8.8",
|
|
38
|
-
"react-test-renderer": "18.3.1",
|
|
39
|
-
"typescript": "5.7.3"
|
|
40
|
-
},
|
|
41
|
-
"engines": {
|
|
42
|
-
"node": ">=18"
|
|
19
|
+
"react-native-webview": "13.13.5",
|
|
20
|
+
"patch-package": "8.0.0"
|
|
43
21
|
}
|
|
44
|
-
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
diff --git a/node_modules/react-native-webview/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java b/node_modules/react-native-webview/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java
|
|
2
|
+
index ff2cba5..47f3777 100644
|
|
3
|
+
--- a/node_modules/react-native-webview/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java
|
|
4
|
+
+++ b/node_modules/react-native-webview/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java
|
|
5
|
+
@@ -313,6 +313,12 @@ public class RNCWebViewManager extends ViewGroupManager<RNCWebViewWrapper>
|
|
6
|
+
mRNCWebViewManagerImpl.setSource(view, value);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
+ @Override
|
|
10
|
+
+ @ReactProp(name = "source")
|
|
11
|
+
+ public void setSource(RNCWebViewWrapper view, @Nullable ReadableMap value) {
|
|
12
|
+
+ mRNCWebViewManagerImpl.setSource(view, value);
|
|
13
|
+
+ }
|
|
14
|
+
+
|
|
15
|
+
@Override
|
|
16
|
+
@ReactProp(name = "textZoom")
|
|
17
|
+
public void setTextZoom(RNCWebViewWrapper view, int value) {
|
|
18
|
+
diff --git a/node_modules/react-native-webview/src/RNCWebViewNativeComponent.ts b/node_modules/react-native-webview/src/RNCWebViewNativeComponent.ts
|
|
19
|
+
index be8ba08..e03fce4 100644
|
|
20
|
+
--- a/node_modules/react-native-webview/src/RNCWebViewNativeComponent.ts
|
|
21
|
+
+++ b/node_modules/react-native-webview/src/RNCWebViewNativeComponent.ts
|
|
22
|
+
@@ -290,6 +290,14 @@ export interface NativeProps extends ViewProps {
|
|
23
|
+
html?: string;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
}>;
|
|
26
|
+
+ source: Readonly<{
|
|
27
|
+
+ uri?: string;
|
|
28
|
+
+ method?: string;
|
|
29
|
+
+ body?: string;
|
|
30
|
+
+ headers?: ReadonlyArray<Readonly<{ name: string; value: string }>>;
|
|
31
|
+
+ html?: string;
|
|
32
|
+
+ baseUrl?: string;
|
|
33
|
+
+ }>;
|
|
34
|
+
userAgent?: string;
|
|
35
|
+
injectedJavaScriptObject?: string;
|
|
36
|
+
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
|
+
adb reverse tcp:8081 tcp:8081 >/dev/null || :
|
|
4
5
|
if [[ $npm_config_o || $npm_config_open ]]; then
|
|
5
6
|
studio android || open -a 'Android Studio' android
|
|
7
|
+
# check if metro is already running
|
|
8
|
+
if ! pgrep -f "react-native start" >/dev/null; then
|
|
9
|
+
npm start
|
|
10
|
+
fi
|
|
6
11
|
else
|
|
7
12
|
react-native run-android
|
|
8
13
|
fi
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
4
|
if [[ $npm_config_o || $npm_config_open ]]; then
|
|
5
|
-
open ios/
|
|
5
|
+
open ios/App.xcworkspace
|
|
6
|
+
# check if metro is already running
|
|
7
|
+
if ! pgrep -f "react-native start" > /dev/null; then
|
|
8
|
+
npm start
|
|
9
|
+
fi
|
|
6
10
|
else
|
|
7
11
|
react-native run-ios
|
|
8
12
|
fi
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
html,
|
|
2
|
+
body {
|
|
3
|
+
width: 99%;
|
|
4
|
+
height: 99vh;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.page {
|
|
10
|
+
height: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.column {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.row {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.header {
|
|
31
|
+
text-align: center;
|
|
32
|
+
padding-top: 80px;
|
|
33
|
+
margin-top: -10px;
|
|
34
|
+
background-color: rgba(0, 0, 0, 0.03);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title {
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
font-size: 18px;
|
|
40
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.divider {
|
|
44
|
+
height: 1px;
|
|
45
|
+
background-color: rgba(0, 0, 0, 0.075);
|
|
46
|
+
margin-top: 13px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.no-scroll {
|
|
50
|
+
flex-grow: 1;
|
|
51
|
+
overflow-y: hidden;
|
|
52
|
+
overflow-x: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.button {
|
|
56
|
+
width: 175px;
|
|
57
|
+
height: 40px;
|
|
58
|
+
margin: 5px;
|
|
59
|
+
margin-top: 10px;
|
|
60
|
+
background-color: #4285F4;
|
|
61
|
+
color: white;
|
|
62
|
+
border: none;
|
|
63
|
+
padding: 10px 20px;
|
|
64
|
+
font-size: 16px;
|
|
65
|
+
border-radius: 100px;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
transition: all 0.3s ease;
|
|
68
|
+
user-select: none;
|
|
69
|
+
-webkit-user-select: none;
|
|
70
|
+
-moz-user-select: none;
|
|
71
|
+
-ms-user-select: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.button:active {
|
|
75
|
+
position: relative;
|
|
76
|
+
top: 1px;
|
|
77
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="page">
|
|
2
|
+
<div class="column header">
|
|
3
|
+
<span id="status" class="title">Loading...</span>
|
|
4
|
+
<div class="column divider"></div>
|
|
5
|
+
</div>
|
|
6
|
+
<div id="main" class="column no-scroll">
|
|
7
|
+
<div class="column">
|
|
8
|
+
<img id="first-image" src="images/portrait.png" width="150px" style="padding: 10px">
|
|
9
|
+
<img id="second-image" src="images/portrait.png" width="150px" style="padding: 10px">
|
|
10
|
+
</div>
|
|
11
|
+
<div class="column" style="padding: 10px">
|
|
12
|
+
<button id="match-faces" class="button">Match</button>
|
|
13
|
+
<button id="start-liveness" class="button">Liveness</button>
|
|
14
|
+
<button id="clear-results" class="button">Clear</button>
|
|
15
|
+
</div>
|
|
16
|
+
<div>
|
|
17
|
+
Similarity: <span style="margin-right: 15px" id="similarity-status">null</span> Liveness: <span
|
|
18
|
+
id="liveness-status">null</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div style="padding-top: 100px;"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { launchImageLibrary } from 'react-native-image-picker'
|
|
1
|
+
import { document } from '../index'
|
|
3
2
|
import * as RNFS from 'react-native-fs'
|
|
4
|
-
import {
|
|
3
|
+
import { Alert, Platform } from 'react-native'
|
|
4
|
+
import { launchImageLibrary } from 'react-native-image-picker'
|
|
5
5
|
import { FaceSDK, MatchFacesRequest, MatchFacesImage, InitConfig, LivenessSkipStep, ImageType, LivenessStatus, LivenessConfig } from '@regulaforensics/face-sdk'
|
|
6
6
|
|
|
7
7
|
async function init() {
|
|
@@ -52,10 +52,12 @@ function clearResults() {
|
|
|
52
52
|
// otherwise init without license.
|
|
53
53
|
async function initialize() {
|
|
54
54
|
setStatus("Initializing...")
|
|
55
|
+
|
|
55
56
|
var license = await loadAssetIfExists("regula.license")
|
|
56
57
|
var config: InitConfig | undefined
|
|
57
58
|
if (license != null) config = new InitConfig(license)
|
|
58
59
|
var [success, error] = await faceSdk.initialize({ config: config })
|
|
60
|
+
|
|
59
61
|
if (!success && error != null) {
|
|
60
62
|
setStatus(error.message)
|
|
61
63
|
console.log(error.code + ": " + error.message)
|
|
@@ -113,94 +115,25 @@ async function loadAssetIfExists(path: string): Promise<string | null> {
|
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
var faceSdk = FaceSDK.instance
|
|
116
|
-
|
|
117
118
|
var image1: MatchFacesImage | null
|
|
118
119
|
var image2: MatchFacesImage | null
|
|
119
120
|
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
var setUiImage1: (val: string) => void
|
|
126
|
-
var setUiImage2: (val: string) => void
|
|
121
|
+
var setStatus = (data: string) => document.getElementById("status").innerHTML = data
|
|
122
|
+
var setLivenessStatus = (data: string) => document.getElementById("liveness-status").innerHTML = data
|
|
123
|
+
var setSimilarityStatus = (data: string) => document.getElementById("similarity-status").innerHTML = data
|
|
124
|
+
var setUiImage1 = (data: string) => (document.getElementById("first-image") as HTMLImageElement).src = data
|
|
125
|
+
var setUiImage2 = (data: string) => (document.getElementById("second-image") as HTMLImageElement).src = data
|
|
127
126
|
var resetImages = () => {
|
|
128
|
-
setUiImage1(
|
|
129
|
-
setUiImage2(
|
|
127
|
+
setUiImage1("images/portrait.png")
|
|
128
|
+
setUiImage2("images/portrait.png")
|
|
130
129
|
}
|
|
131
130
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
[similarityStatus, setSimilarityStatus] = useState<string>("null");
|
|
139
|
-
[livenessStatus, setLivenessStatus] = useState<string>("null");
|
|
140
|
-
const [uiImage1, setUiImage1Original] = useState<any>(require('./images/portrait.png'));
|
|
141
|
-
const [uiImage2, setUiImage2Original] = useState<any>(require('./images/portrait.png'));
|
|
142
|
-
setUiImage1 = imageSetter(setUiImage1Original)
|
|
143
|
-
setUiImage2 = imageSetter(setUiImage2Original)
|
|
144
|
-
|
|
145
|
-
useEffect(() => {
|
|
146
|
-
init()
|
|
147
|
-
return () => {
|
|
148
|
-
faceSdk.deinitialize()
|
|
149
|
-
clearResults()
|
|
150
|
-
}
|
|
151
|
-
}, [])
|
|
152
|
-
|
|
153
|
-
return (
|
|
154
|
-
<SafeAreaView style={styles.body}>
|
|
155
|
-
<Text style={styles.title}>{status}</Text>
|
|
156
|
-
|
|
157
|
-
<View style={styles.container}>
|
|
158
|
-
<MyImage image={uiImage1} onPress={() => pickImage(1)} />
|
|
159
|
-
<MyImage image={uiImage2} onPress={() => pickImage(2)} />
|
|
160
|
-
|
|
161
|
-
<View style={{ padding: 10 }} />
|
|
162
|
-
<MyButton text="Match" onPress={() => { matchFaces() }} />
|
|
163
|
-
<MyButton text="Liveness" onPress={() => { startLiveness() }} />
|
|
164
|
-
<MyButton text="Clear" onPress={() => { clearResults() }} />
|
|
165
|
-
|
|
166
|
-
<View style={{ flexDirection: 'row', padding: 20 }}>
|
|
167
|
-
<Text style={{ padding: 10 }}>Similarity: {similarityStatus}</Text>
|
|
168
|
-
<Text style={{ padding: 10 }}>Liveness: {livenessStatus}</Text>
|
|
169
|
-
</View>
|
|
170
|
-
</View>
|
|
171
|
-
</SafeAreaView>
|
|
172
|
-
)
|
|
173
|
-
}
|
|
174
|
-
export default App
|
|
131
|
+
export function onload() {
|
|
132
|
+
document.getElementById("first-image").onclick = () => pickImage(1)
|
|
133
|
+
document.getElementById("second-image").onclick = () => pickImage(2)
|
|
134
|
+
document.getElementById("match-faces").onclick = () => matchFaces()
|
|
135
|
+
document.getElementById("start-liveness").onclick = () => startLiveness()
|
|
136
|
+
document.getElementById("clear-results").onclick = () => clearResults()
|
|
175
137
|
|
|
176
|
-
|
|
177
|
-
return <TouchableOpacity onPress={onPress}>
|
|
178
|
-
<Image source={image} resizeMode="contain" style={{ height: 150, width: 200, padding: 5 }} />
|
|
179
|
-
</TouchableOpacity>
|
|
138
|
+
init()
|
|
180
139
|
}
|
|
181
|
-
|
|
182
|
-
function MyButton({ text, onPress }: any): React.JSX.Element {
|
|
183
|
-
return <View style={{ padding: 5 }}>
|
|
184
|
-
<Button title={text} color="#4285F4" onPress={onPress} />
|
|
185
|
-
</View>
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
const styles = StyleSheet.create({
|
|
189
|
-
body: {
|
|
190
|
-
width: '100%',
|
|
191
|
-
height: '100%',
|
|
192
|
-
alignItems: 'center',
|
|
193
|
-
backgroundColor: '#F5FCFF',
|
|
194
|
-
},
|
|
195
|
-
title: {
|
|
196
|
-
fontSize: 30,
|
|
197
|
-
paddingTop: 30
|
|
198
|
-
},
|
|
199
|
-
container: {
|
|
200
|
-
flex: 1,
|
|
201
|
-
justifyContent: 'center',
|
|
202
|
-
alignItems: 'center',
|
|
203
|
-
backgroundColor: '#F5FCFF',
|
|
204
|
-
paddingBottom: 50
|
|
205
|
-
},
|
|
206
|
-
})
|
package/ios/RFSWConfig.m
CHANGED
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
@"torchButtonEnabled": ^{ [builder setTorchButtonEnabled:[value boolValue]]; },
|
|
15
15
|
@"vibrateOnSteps": ^{ [builder setVibrateOnSteps:[value boolValue]]; },
|
|
16
16
|
@"detectOcclusion": ^{ [builder setDetectOcclusion:[value boolValue]]; },
|
|
17
|
+
@"showFaceAnimation": ^{ [builder setShowFaceAnimation:[value boolValue]]; },
|
|
17
18
|
@"cameraPositionIOS": ^{ [builder setCameraPosition:[value integerValue]]; },
|
|
19
|
+
@"screenOrientation": ^{ [builder setScreenOrientation:[RFSWJSONConstructor screenOrienrationFromJSON:value]]; },
|
|
18
20
|
@"timeout": ^{ [builder setTimeoutInterval:value]; },
|
|
19
21
|
@"holdStillDuration": ^{ [builder setHoldStillDuration:value]; },
|
|
20
22
|
};
|
|
@@ -31,7 +33,9 @@
|
|
|
31
33
|
@"torchButtonEnabled":@(input.torchButtonEnabled),
|
|
32
34
|
@"vibrateOnSteps":@(input.vibrateOnSteps),
|
|
33
35
|
@"detectOcclusion":@(input.detectOcclusion),
|
|
36
|
+
@"showFaceAnimation":@(input.showFaceAnimation),
|
|
34
37
|
@"cameraPositionIOS":@(input.cameraPosition),
|
|
38
|
+
@"screenOrientation":[RFSWJSONConstructor generateScreenOrienration:input.screenOrientation],
|
|
35
39
|
}.mutableCopy;
|
|
36
40
|
if (input.timeoutInterval) result[@"timeout"] = input.timeoutInterval;
|
|
37
41
|
if (input.holdStillDuration) result[@"holdStillDuration"] = input.holdStillDuration;
|
|
@@ -54,6 +58,7 @@
|
|
|
54
58
|
@"locationTrackingEnabled": ^{ [builder setLocationTrackingEnabled:[value boolValue]]; },
|
|
55
59
|
@"recordingProcess": ^{ [builder setRecordingProcess:[value integerValue]]; },
|
|
56
60
|
@"livenessType": ^{ [builder setLivenessType:[value integerValue]]; },
|
|
61
|
+
@"screenOrientation": ^{ [builder setScreenOrientation:[RFSWJSONConstructor screenOrienrationFromJSON:value]]; },
|
|
57
62
|
@"tag": ^{ [builder setTag:value]; },
|
|
58
63
|
@"skipStep": ^{ [builder setStepSkippingMask:[RFSWJSONConstructor livenessStepSkipFromJSON:value]]; },
|
|
59
64
|
@"metadata": ^{ [builder setMetadata:value]; },
|
|
@@ -75,6 +80,7 @@
|
|
|
75
80
|
@"locationTrackingEnabled":@(input.locationTrackingEnabled),
|
|
76
81
|
@"recordingProcess":@(input.recordingProcess),
|
|
77
82
|
@"livenessType":@(input.livenessType),
|
|
83
|
+
@"screenOrientation":[RFSWJSONConstructor generateScreenOrienration:input.screenOrientation],
|
|
78
84
|
@"skipStep":[RFSWJSONConstructor generateLivenessStepSkip:input.stepSkippingMask],
|
|
79
85
|
@"metadata":input.metadata,
|
|
80
86
|
}.mutableCopy;
|
|
@@ -123,7 +129,7 @@
|
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
131
|
|
|
126
|
-
+(id)imageQualityCharacteristicWithName:(NSString*)name recommendedRange:(NSArray*)recommendedRange customRange:(NSArray*)customRange color:(UIColor*)color {
|
|
132
|
+
+(id)imageQualityCharacteristicWithName:(NSString*)name recommendedRange:(NSArray*)recommendedRange customRange:(NSArray*)customRange color:(UIColor*)color {
|
|
127
133
|
__block RFSImageQualityCharacteristic* result = nil;
|
|
128
134
|
NSDictionary* Switch = @{
|
|
129
135
|
@"ImageWidth": ^{ result = [RFSImageCharacteristics imageWidthWithRange:recommendedRange]; },
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
+(UIFont* _Nonnull)fontFromJSON:(NSDictionary* _Nonnull)input;
|
|
16
16
|
+(RFSLivenessStepSkip)livenessStepSkipFromJSON:(NSArray<NSNumber*>* _Nonnull)input;
|
|
17
17
|
+(NSArray<NSNumber*>* _Nonnull)generateLivenessStepSkip:(RFSLivenessStepSkip)input;
|
|
18
|
+
+(RFSScreenOrientation)screenOrienrationFromJSON:(NSArray<NSNumber*>* _Nonnull)input;
|
|
19
|
+
+(NSArray<NSNumber*>* _Nonnull)generateScreenOrienration:(RFSScreenOrientation)input;
|
|
18
20
|
+(UIColor* _Nonnull)colorWithInt:(NSNumber* _Nonnull)input;
|
|
19
21
|
|
|
20
22
|
+(id _Nonnull)generateInitCompletion:(BOOL)success :(NSError* _Nullable)error;
|
|
@@ -80,6 +80,25 @@
|
|
|
80
80
|
return @[];
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
+(RFSScreenOrientation)screenOrienrationFromJSON:(NSArray<NSNumber*>*)input {
|
|
84
|
+
// same as input.contains(1)
|
|
85
|
+
bool portrait = CFArrayContainsValue((__bridge CFArrayRef)input, CFRangeMake(0, input.count), (CFNumberRef)@0);
|
|
86
|
+
bool landscape = CFArrayContainsValue((__bridge CFArrayRef)input, CFRangeMake(0, input.count), (CFNumberRef)@1);
|
|
87
|
+
|
|
88
|
+
if (portrait && !landscape) return RFSScreenOrientationPortrait;
|
|
89
|
+
if (landscape && !portrait) return RFSScreenOrientationLandscape;
|
|
90
|
+
if (portrait && landscape) return RFSScreenOrientationPortrait | RFSScreenOrientationLandscape;
|
|
91
|
+
|
|
92
|
+
return RFSScreenOrientationPortrait;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
+(NSArray<NSNumber*>*)generateScreenOrienration:(RFSScreenOrientation)input {
|
|
96
|
+
if(input == RFSScreenOrientationPortrait) return @[@0];
|
|
97
|
+
if(input == RFSScreenOrientationLandscape) return @[@1];
|
|
98
|
+
if(input == (RFSScreenOrientationPortrait | RFSScreenOrientationLandscape)) return @[@0, @1];
|
|
99
|
+
return @[@0];
|
|
100
|
+
}
|
|
101
|
+
|
|
83
102
|
+(id)colorWithInt:(NSNumber*)input {
|
|
84
103
|
if (!input || [input isEqual:[NSNull null]]) return nil;
|
|
85
104
|
// Convert hex int to hex string
|
|
@@ -311,7 +330,7 @@
|
|
|
311
330
|
|
|
312
331
|
+(id)matchFacesImageFromJSON:(NSDictionary*)input {
|
|
313
332
|
bool detectAll = false;
|
|
314
|
-
if (input[@"detectAll"]) detectAll = input[@"detectAll"];
|
|
333
|
+
if (input[@"detectAll"]) detectAll = [input[@"detectAll"] boolValue];
|
|
315
334
|
RFSMatchFacesImage* result = [[RFSMatchFacesImage alloc] initWithImage:[self imageWithBase64:input[@"image"]]
|
|
316
335
|
imageType:[input[@"imageType"] integerValue]
|
|
317
336
|
detectAll:detectAll];
|
|
@@ -762,10 +781,9 @@
|
|
|
762
781
|
|
|
763
782
|
+(id)generatePerson:(RFSPerson*)input {
|
|
764
783
|
if (!input) return [NSNull null];
|
|
765
|
-
NSMutableDictionary* result = @{
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
}.mutableCopy;
|
|
784
|
+
NSMutableDictionary* result = @{}.mutableCopy;
|
|
785
|
+
if (input.updatedAt) result[@"updatedAt"] = [self generateDate:input.updatedAt];
|
|
786
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
769
787
|
if (input.name) result[@"name"] = input.name;
|
|
770
788
|
if (input.groups) result[@"groups"] = input.groups;
|
|
771
789
|
if (input.itemId) result[@"id"] = input.itemId;
|
|
@@ -807,9 +825,9 @@
|
|
|
807
825
|
+(id)generatePersonImage:(RFSPersonImage*)input {
|
|
808
826
|
if (!input) return [NSNull null];
|
|
809
827
|
NSMutableDictionary* result = @{
|
|
810
|
-
@"url":[self generateUrl:input.url]
|
|
811
|
-
@"createdAt":[self generateDate:input.createdAt]
|
|
828
|
+
@"url":[self generateUrl:input.url]
|
|
812
829
|
}.mutableCopy;
|
|
830
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
813
831
|
if (input.path) result[@"path"] = input.path;
|
|
814
832
|
if (input.contentType) result[@"contentType"] = input.contentType;
|
|
815
833
|
if (input.itemId) result[@"id"] = input.itemId;
|
|
@@ -843,9 +861,8 @@
|
|
|
843
861
|
|
|
844
862
|
+(id)generatePersonGroup:(RFSPersonGroup*)input {
|
|
845
863
|
if (!input) return [NSNull null];
|
|
846
|
-
NSMutableDictionary* result = @{
|
|
847
|
-
|
|
848
|
-
}.mutableCopy;
|
|
864
|
+
NSMutableDictionary* result = @{}.mutableCopy;
|
|
865
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
849
866
|
if (input.name) result[@"name"] = input.name;
|
|
850
867
|
if (input.itemId) result[@"id"] = input.itemId;
|
|
851
868
|
if (input.metadata) result[@"metadata"] = input.metadata;
|
|
@@ -876,7 +893,7 @@
|
|
|
876
893
|
imageUpload:[self imageUploadFromJSON:input[@"imageUpload"]]];
|
|
877
894
|
result.threshold = input[@"threshold"];
|
|
878
895
|
result.limit = input[@"limit"];
|
|
879
|
-
if (input[@"detectAll"] && ![input[@"detectAll"] isEqual:[NSNull null]]) result.detectAll = input[@"detectAll"];
|
|
896
|
+
if (input[@"detectAll"] && ![input[@"detectAll"] isEqual:[NSNull null]]) result.detectAll = [input[@"detectAll"] boolValue];
|
|
880
897
|
result.outputImageParams = [self outputImageParamsFromJSON:input[@"outputImageParams"]];
|
|
881
898
|
return result;
|
|
882
899
|
}
|
|
@@ -934,9 +951,9 @@
|
|
|
934
951
|
|
|
935
952
|
+(id)generateSearchPersonImage:(RFSSearchPersonImage*)input {
|
|
936
953
|
NSMutableDictionary* result = @{
|
|
937
|
-
@"url":[self generateUrl:input.url]
|
|
938
|
-
@"createdAt":[self generateDate:input.createdAt]
|
|
954
|
+
@"url":[self generateUrl:input.url]
|
|
939
955
|
}.mutableCopy;
|
|
956
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
940
957
|
if (input.path) result[@"similarity"] = input.similarity;
|
|
941
958
|
if (input.path) result[@"distance"] = input.distance;
|
|
942
959
|
if (input.path) result[@"path"] = input.path;
|
|
@@ -964,9 +981,9 @@
|
|
|
964
981
|
NSMutableDictionary* result = @{
|
|
965
982
|
@"detection":[self generateSearchPersonDetection:input.detection],
|
|
966
983
|
@"images":[self generateArray:input.images :@selector(generateSearchPersonImage:)],
|
|
967
|
-
@"updatedAt":[self generateDate:input.updatedAt],
|
|
968
|
-
@"createdAt":[self generateDate:input.createdAt]
|
|
969
984
|
}.mutableCopy;
|
|
985
|
+
if (input.createdAt) result[@"createdAt"] = [self generateDate:input.createdAt];
|
|
986
|
+
if (input.updatedAt) result[@"updatedAt"] = [self generateDate:input.updatedAt];
|
|
970
987
|
if (input.name) result[@"name"] = input.name;
|
|
971
988
|
if (input.groups) result[@"groups"] = input.groups;
|
|
972
989
|
if (input.itemId) result[@"id"] = input.itemId;
|
package/ios/RFSWMain.m
CHANGED
|
@@ -153,7 +153,7 @@ static UIViewController*(^rootViewController)(void) = ^UIViewController*(){
|
|
|
153
153
|
completion:[self detectFacesCompletion:callback]];
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
+(void)createPerson:(NSString*)name :(
|
|
156
|
+
+(void)createPerson:(NSString*)name :(NSArray<NSString*>*)groupIds :(NSDictionary*)metadata :(RFSWCallback)callback {
|
|
157
157
|
[RFSFaceSDK.service.personDatabase createPersonWithName:name
|
|
158
158
|
metadata:metadata
|
|
159
159
|
groupIds:groupIds
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/face-sdk",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.252-beta",
|
|
4
4
|
"description": "This is an npm module for Regula Face SDK. It allows you to easily compaire faces using your phone's camera.",
|
|
5
5
|
"main": "www/react-native/index.js",
|
|
6
6
|
"module": "www/capacitor/index.js",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/face-sdk" version="7.1.
|
|
2
|
+
<plugin id="@regulaforensics/face-sdk" version="7.1.252-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>FaceSDK</name>
|
|
4
4
|
<description>Cordova plugin for Regula Face SDK</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<feature name="FaceSDK">
|
|
15
15
|
<param name="ios-package" value="CVDFaceSDK" />
|
|
16
16
|
</feature>
|
|
17
|
-
<preference name="deployment-target" value="
|
|
17
|
+
<preference name="deployment-target" value="13.0" />
|
|
18
18
|
</config-file>
|
|
19
19
|
<header-file src="ios/CVDFaceSDK.h" />
|
|
20
20
|
<source-file src="ios/CVDFaceSDK.m" />
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
<source-file src="ios/RFSWConfig.m" />
|
|
27
27
|
<podspec>
|
|
28
28
|
<config>
|
|
29
|
-
<source url="https://
|
|
29
|
+
<source url="https://github.com/CocoaPods/Specs.git" />
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="FaceSDKStage" spec="7.1.
|
|
32
|
+
<pod name="FaceSDKStage" spec="7.1.2586" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
|
@@ -7,9 +7,11 @@ export class FaceCaptureConfig {
|
|
|
7
7
|
closeButtonEnabled
|
|
8
8
|
torchButtonEnabled
|
|
9
9
|
vibrateOnSteps
|
|
10
|
+
detectOcclusion
|
|
11
|
+
showFaceAnimation
|
|
10
12
|
cameraPositionIOS
|
|
11
|
-
screenOrientation
|
|
12
13
|
cameraPositionAndroid
|
|
14
|
+
screenOrientation
|
|
13
15
|
timeout
|
|
14
16
|
holdStillDuration
|
|
15
17
|
|
|
@@ -19,9 +21,11 @@ export class FaceCaptureConfig {
|
|
|
19
21
|
this.closeButtonEnabled = params?.closeButtonEnabled ?? true
|
|
20
22
|
this.torchButtonEnabled = params?.torchButtonEnabled ?? true
|
|
21
23
|
this.vibrateOnSteps = params?.vibrateOnSteps ?? true
|
|
24
|
+
this.detectOcclusion = params?.detectOcclusion ?? true
|
|
25
|
+
this.showFaceAnimation = params?.showFaceAnimation ?? true
|
|
22
26
|
this.cameraPositionIOS = params?.cameraPositionIOS ?? CameraPosition.FRONT
|
|
23
|
-
this.screenOrientation = params?.screenOrientation ?? [ScreenOrientation.PORTRAIT]
|
|
24
27
|
this.cameraPositionAndroid = params?.cameraPositionAndroid
|
|
28
|
+
this.screenOrientation = params?.screenOrientation ?? [ScreenOrientation.PORTRAIT]
|
|
25
29
|
this.timeout = params?.timeout
|
|
26
30
|
this.holdStillDuration = params?.holdStillDuration
|
|
27
31
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
export class InitConfig {
|
|
2
2
|
license
|
|
3
3
|
licenseUpdate
|
|
4
|
+
useBleDevice
|
|
5
|
+
|
|
6
|
+
static withBleDevice() {
|
|
7
|
+
var result = new InitConfig()
|
|
8
|
+
result.useBleDevice = true
|
|
9
|
+
return result
|
|
10
|
+
}
|
|
4
11
|
|
|
5
12
|
constructor(license, params) {
|
|
6
13
|
this.license = license
|
|
7
14
|
this.licenseUpdate = params?.licenseUpdate
|
|
15
|
+
this.useBleDevice = false
|
|
8
16
|
}
|
|
9
17
|
}
|