@regulaforensics/face-sdk 6.4.199-beta → 6.4.206-rc
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/.gitlab/report.yaml +75 -0
- package/.gitlab-ci.yml +49 -0
- package/RNFaceSDK.podspec +3 -3
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +4 -2
- package/examples/capacitor/README.md +4 -4
- package/examples/capacitor/android/build.gradle +2 -2
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +2 -2
- package/examples/capacitor/ios/App/Podfile +1 -1
- package/examples/capacitor/package.json +13 -13
- package/examples/capacitor/scripts/android.sh +9 -0
- package/examples/capacitor/scripts/ios.sh +8 -0
- package/examples/capacitor/scripts/setup.sh +4 -0
- package/examples/cordova/README.md +4 -4
- package/examples/cordova/config.xml +2 -2
- package/examples/cordova/package.json +10 -16
- package/examples/cordova/scripts/android.sh +8 -0
- package/examples/cordova/scripts/ios.sh +8 -0
- package/examples/cordova/scripts/setup.sh +5 -0
- package/examples/cordova/www/js/index.js +13 -13
- package/examples/ionic/README.md +4 -4
- package/examples/ionic/config.xml +2 -2
- package/examples/ionic/package.json +16 -17
- package/examples/ionic/scripts/android.sh +8 -0
- package/examples/ionic/scripts/ios.sh +8 -0
- package/examples/ionic/scripts/setup.sh +5 -0
- package/examples/react-native/Gemfile +1 -0
- package/examples/react-native/Gemfile.lock +26 -23
- package/examples/react-native/README.md +4 -4
- package/examples/react-native/android/app/src/main/java/com/regula/face/api/MainApplication.kt +2 -1
- package/examples/react-native/android/build.gradle +3 -3
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties +2 -2
- package/examples/react-native/android/gradlew +4 -1
- package/examples/react-native/ios/Podfile.lock +319 -303
- package/examples/react-native/package-lock.json +6101 -6298
- package/examples/react-native/package.json +20 -18
- package/examples/react-native/scripts/android.sh +8 -0
- package/examples/react-native/scripts/ios.sh +8 -0
- package/examples/react-native/scripts/setup.sh +8 -0
- package/package.json +1 -1
- package/plugin.xml +4 -2
- package/www/capacitor/liveness/liveness_backend_exception.js +3 -0
- package/www/cordova.js +4 -1
- package/www/react-native/liveness/liveness_backend_exception.js +3 -0
- package/www/types/index.d.ts +1 -0
- package/www/types/liveness/liveness_backend_exception.d.ts +3 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
spec:
|
|
2
|
+
inputs:
|
|
3
|
+
stage:
|
|
4
|
+
default: reports
|
|
5
|
+
image:
|
|
6
|
+
default: ubuntu:22.04
|
|
7
|
+
ignore_vulnerabilities:
|
|
8
|
+
default: "false"
|
|
9
|
+
sast_report_file:
|
|
10
|
+
default: gl-sast-report.json
|
|
11
|
+
secret_detection_report_file:
|
|
12
|
+
default: gl-secret-detection-report.json
|
|
13
|
+
dependency_scanning_report_file:
|
|
14
|
+
default: gl-dependency-scanning-report.json
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
view reports:
|
|
18
|
+
image: $[[ inputs.image ]]
|
|
19
|
+
stage: $[[ inputs.stage ]]
|
|
20
|
+
variables:
|
|
21
|
+
IGNORE_VULNERABILITIES: $[[ inputs.ignore_vulnerabilities ]]
|
|
22
|
+
SAST_REPORT_FILE: $[[ inputs.sast_report_file ]]
|
|
23
|
+
SECRET_DETECTION_REPORT_FILE: $[[ inputs.secret_detection_report_file ]]
|
|
24
|
+
DEPENDENCY_SCANNING_REPORT_FILE: $[[ inputs.dependency_scanning_report_file ]]
|
|
25
|
+
RED: \033[0;31m
|
|
26
|
+
YELLOW: \033[1;33m
|
|
27
|
+
GREEN: \033[0;32m
|
|
28
|
+
NC: \033[0m
|
|
29
|
+
needs:
|
|
30
|
+
- job: semgrep-sast
|
|
31
|
+
artifacts: true
|
|
32
|
+
- job: secret_detection
|
|
33
|
+
artifacts: true
|
|
34
|
+
- job: gemnasium-dependency_scanning
|
|
35
|
+
artifacts: true
|
|
36
|
+
rules:
|
|
37
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
38
|
+
script:
|
|
39
|
+
- ls -la
|
|
40
|
+
- apt update && apt install -y jq
|
|
41
|
+
- |
|
|
42
|
+
for f in SAST_REPORT_FILE SECRET_DETECTION_REPORT_FILE DEPENDENCY_SCANNING_REPORT_FILE
|
|
43
|
+
do
|
|
44
|
+
if [[ -f "${!f}" ]]
|
|
45
|
+
then
|
|
46
|
+
echo -e "${GREEN}File ${!f} exists, adding report${NC}"
|
|
47
|
+
r=${f/%_FILE}
|
|
48
|
+
declare $r="$(cat ${!f} | jq 'select(.vulnerabilities != []).vulnerabilities')"
|
|
49
|
+
if [[ ! -z "${!r}" ]]
|
|
50
|
+
then
|
|
51
|
+
VULNERABILITIES_FOUND=true
|
|
52
|
+
echo -e "${RED}Found $r vulnerabilities${NC}"
|
|
53
|
+
echo "${!r}"
|
|
54
|
+
echo
|
|
55
|
+
fi
|
|
56
|
+
else
|
|
57
|
+
echo -e "${YELLOW}File ${!f} doesn't exist, skipping${NC}"
|
|
58
|
+
fi
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
if [[ "$VULNERABILITIES_FOUND" == true ]]
|
|
62
|
+
then
|
|
63
|
+
if [[ "$IGNORE_VULNERABILITIES" == true ]]
|
|
64
|
+
then
|
|
65
|
+
echo -e "${GREEN}All found vulnerabilities were ignored due to IGNORE_VULNERABILITIES=true${NC}"
|
|
66
|
+
exit 0
|
|
67
|
+
else
|
|
68
|
+
echo -e "${RED}Vulnerabilities found, please see reports above${NC}"
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
echo -e "${GREEN}No vulnerabilities found${NC}"
|
|
74
|
+
|
|
75
|
+
exit 0
|
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
stages:
|
|
2
|
+
- test
|
|
3
|
+
- reports
|
|
4
|
+
|
|
5
|
+
include:
|
|
6
|
+
- template: Jobs/SAST.gitlab-ci.yml
|
|
7
|
+
- template: Jobs/Secret-Detection.gitlab-ci.yml
|
|
8
|
+
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
|
|
9
|
+
- local: .gitlab/report.yaml
|
|
10
|
+
rules:
|
|
11
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
12
|
+
inputs:
|
|
13
|
+
stage: reports
|
|
14
|
+
image: ubuntu:22.04
|
|
15
|
+
ignore_vulnerabilities: "false"
|
|
16
|
+
sast_report_file: gl-sast-report.json
|
|
17
|
+
secret_detection_report_file: gl-secret-detection-report.json
|
|
18
|
+
dependency_scanning_report_file: gl-dependency-scanning-report.json
|
|
19
|
+
|
|
20
|
+
trivy scan:
|
|
21
|
+
stage: test
|
|
22
|
+
image: aquasec/trivy
|
|
23
|
+
rules:
|
|
24
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
25
|
+
script:
|
|
26
|
+
- trivy fs --severity CRITICAL,HIGH,MEDIUM,LOW --ignore-unfixed --db-repository container-registry.regula.local:80/aquasecurity/trivy-db:2 --exit-code 1 .
|
|
27
|
+
|
|
28
|
+
semgrep-sast:
|
|
29
|
+
rules:
|
|
30
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
31
|
+
artifacts:
|
|
32
|
+
paths:
|
|
33
|
+
- gl-sast-report.json
|
|
34
|
+
|
|
35
|
+
secret_detection:
|
|
36
|
+
rules:
|
|
37
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
38
|
+
artifacts:
|
|
39
|
+
paths:
|
|
40
|
+
- gl-secret-detection-report.json
|
|
41
|
+
|
|
42
|
+
gemnasium-dependency_scanning:
|
|
43
|
+
variables:
|
|
44
|
+
DS_MAX_DEPTH: -1
|
|
45
|
+
rules:
|
|
46
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
47
|
+
artifacts:
|
|
48
|
+
paths:
|
|
49
|
+
- gl-dependency-scanning-report.json
|
package/RNFaceSDK.podspec
CHANGED
|
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
|
|
|
5
5
|
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = 'RNFaceSDK'
|
|
8
|
-
s.version = '6.4.
|
|
8
|
+
s.version = '6.4.206-rc'
|
|
9
9
|
s.summary = package['description']
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
|
|
@@ -13,9 +13,9 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.homepage = 'https://regulaforensics.com'
|
|
14
14
|
|
|
15
15
|
s.source = { http: "file:#{source}" }
|
|
16
|
-
s.ios.deployment_target = '
|
|
16
|
+
s.ios.deployment_target = '12.0'
|
|
17
17
|
s.source_files = 'ios/**/*.{h,m}'
|
|
18
18
|
s.exclude_files = [ 'ios/CVDFaceSDK.h', 'ios/CVDFaceSDK.m' ]
|
|
19
|
-
s.dependency '
|
|
19
|
+
s.dependency 'FaceSDKStage', '7.1.2558'
|
|
20
20
|
s.dependency 'React'
|
|
21
21
|
end
|
package/android/build.gradle
CHANGED
|
@@ -32,7 +32,7 @@ android {
|
|
|
32
32
|
rootProject.allprojects {
|
|
33
33
|
repositories {
|
|
34
34
|
maven {
|
|
35
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
35
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -41,7 +41,7 @@ dependencies {
|
|
|
41
41
|
//noinspection GradleDynamicVersion
|
|
42
42
|
implementation 'com.facebook.react:react-native:+'
|
|
43
43
|
//noinspection GradleDependency
|
|
44
|
-
implementation('com.regula.face:api:6.
|
|
44
|
+
implementation('com.regula.face:api:6.4.3691'){
|
|
45
45
|
transitive = true
|
|
46
46
|
}
|
|
47
47
|
}
|
package/android/cordova.gradle
CHANGED
|
@@ -6,13 +6,13 @@ android {
|
|
|
6
6
|
|
|
7
7
|
repositories {
|
|
8
8
|
maven {
|
|
9
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
9
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
dependencies {
|
|
14
14
|
//noinspection GradleDependency
|
|
15
|
-
implementation('com.regula.face:api:6.
|
|
15
|
+
implementation('com.regula.face:api:6.4.3691'){
|
|
16
16
|
transitive = true
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -193,13 +193,15 @@ fun generateLivenessException(input: LivenessErrorException?) = input?.let {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
fun livenessBackendExceptionFromJSON(input: JSONObject?) = input?.let {
|
|
196
|
-
LivenessBackendException(LivenessBackendErrorCode.createValue(it.getInt("code")))
|
|
196
|
+
LivenessBackendException(LivenessBackendErrorCode.createValue(it.getInt("code")), "")
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
fun generateLivenessBackendException(input: LivenessBackendException?) = input?.let {
|
|
200
|
+
var message = it.message!!
|
|
201
|
+
if (message.startsWith(": ")) message = message.substring(2)
|
|
200
202
|
mapOf(
|
|
201
203
|
"code" to it.errorCode.value,
|
|
202
|
-
"message" to
|
|
204
|
+
"message" to message
|
|
203
205
|
).toJson()
|
|
204
206
|
}
|
|
205
207
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
## How to build demo application
|
|
4
4
|
1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/npm-face-sdk.git`.
|
|
5
5
|
|
|
6
|
-
2.
|
|
6
|
+
2. Execute `npm run setup` within this directory.
|
|
7
7
|
|
|
8
8
|
3. Run the app:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* IOS: `npm run ios`.
|
|
10
|
+
* Android: `npm run android`.
|
|
11
11
|
|
|
12
|
-
**Note**: this is just one way of running the app. You can also
|
|
12
|
+
**Note**: this is just one way of running the app. You can also pass `-o` or `--open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## How to use offine match
|
|
@@ -7,9 +7,9 @@ buildscript {
|
|
|
7
7
|
mavenCentral()
|
|
8
8
|
}
|
|
9
9
|
dependencies {
|
|
10
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
10
|
+
classpath 'com.android.tools.build:gradle:8.8.0'
|
|
11
11
|
classpath 'com.google.gms:google-services:4.3.15'
|
|
12
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.
|
|
12
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25"
|
|
13
13
|
|
|
14
14
|
// NOTE: Do not place your application dependencies here; they belong
|
|
15
15
|
// in the individual module build.gradle files
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
zipStoreBase=GRADLE_USER_HOME
|
|
6
6
|
zipStorePath=wrapper/dists
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
CODE_SIGN_STYLE = Automatic;
|
|
352
352
|
CURRENT_PROJECT_VERSION = 1;
|
|
353
353
|
INFOPLIST_FILE = App/Info.plist;
|
|
354
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
354
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
355
355
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
|
356
356
|
MARKETING_VERSION = 1.0;
|
|
357
357
|
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
CODE_SIGN_STYLE = Automatic;
|
|
373
373
|
CURRENT_PROJECT_VERSION = 1;
|
|
374
374
|
INFOPLIST_FILE = App/Info.plist;
|
|
375
|
-
IPHONEOS_DEPLOYMENT_TARGET =
|
|
375
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
376
376
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
|
377
377
|
MARKETING_VERSION = 1.0;
|
|
378
378
|
PRODUCT_BUNDLE_IDENTIFIER = regula.FaceSDKSample;
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"setup": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"setup": "scripts/setup.sh",
|
|
8
|
+
"ios": "scripts/ios.sh",
|
|
9
|
+
"android": "scripts/android.sh",
|
|
10
10
|
"dev": "vite",
|
|
11
11
|
"build": "tsc && vite build",
|
|
12
12
|
"preview": "vite preview",
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"lint": "eslint"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@regulaforensics/face-sdk": "6.4.
|
|
19
|
-
"@regulaforensics/face-core-basic": "
|
|
18
|
+
"@regulaforensics/face-sdk": "6.4.206-rc",
|
|
19
|
+
"@regulaforensics/face-core-basic": "7.1.117-rc",
|
|
20
20
|
"@awesome-cordova-plugins/camera": "6.6.0",
|
|
21
21
|
"@awesome-cordova-plugins/file": "6.6.0",
|
|
22
22
|
"@awesome-cordova-plugins/dialogs": "6.6.0",
|
|
23
|
-
"@capacitor/android": "
|
|
24
|
-
"@capacitor/
|
|
25
|
-
"@capacitor/
|
|
26
|
-
"@capacitor/
|
|
27
|
-
"@capacitor/
|
|
28
|
-
"@capacitor/keyboard": "
|
|
29
|
-
"@capacitor/status-bar": "
|
|
23
|
+
"@capacitor/android": "7.0.0-rc.0",
|
|
24
|
+
"@capacitor/core": "7.0.0-rc.0",
|
|
25
|
+
"@capacitor/ios": "7.0.0-rc.0",
|
|
26
|
+
"@capacitor/app": "7.0.0-rc.0",
|
|
27
|
+
"@capacitor/haptics": "7.0.0-rc.0",
|
|
28
|
+
"@capacitor/keyboard": "7.0.0-rc.0",
|
|
29
|
+
"@capacitor/status-bar": "7.0.0-rc.0",
|
|
30
30
|
"@ionic/react": "^7.0.0",
|
|
31
31
|
"@ionic/react-router": "^7.0.0",
|
|
32
32
|
"@types/react-router": "^5.1.20",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-router-dom": "^5.3.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@capacitor/cli": "
|
|
45
|
+
"@capacitor/cli": "7.0.0-rc.0",
|
|
46
46
|
"@testing-library/dom": ">=7.21.4",
|
|
47
47
|
"@testing-library/jest-dom": "^5.16.5",
|
|
48
48
|
"@testing-library/react": "^14.0.0",
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
## How to build demo application
|
|
4
4
|
1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/npm-face-sdk.git`.
|
|
5
5
|
|
|
6
|
-
2.
|
|
6
|
+
2. Execute `npm run setup` within this directory.
|
|
7
7
|
|
|
8
8
|
3. Run the app:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* IOS: `npm run ios`.
|
|
10
|
+
* Android: `npm run android`.
|
|
11
11
|
|
|
12
|
-
**Note**: this is just one way of running the app. You can also
|
|
12
|
+
**Note**: this is just one way of running the app. You can also pass `-o` or `--open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## How to use offine match
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<preference name="orientation" value="portrait" />
|
|
15
15
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
16
16
|
<preference name="android-minSdkVersion" value="23" />
|
|
17
|
-
<preference name="android-targetSdkVersion" value="
|
|
17
|
+
<preference name="android-targetSdkVersion" value="35" />
|
|
18
18
|
<allow-intent href="market:*" />
|
|
19
19
|
<config-file parent="/*" target="AndroidManifest.xml">
|
|
20
20
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
<string>To pick images</string>
|
|
35
35
|
</config-file>
|
|
36
36
|
</platform>
|
|
37
|
-
</widget>
|
|
37
|
+
</widget>
|
|
@@ -4,25 +4,19 @@
|
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"setup": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"setup": "scripts/setup.sh",
|
|
8
|
+
"ios": "scripts/ios.sh",
|
|
9
|
+
"android": "scripts/android.sh"
|
|
10
10
|
},
|
|
11
|
-
"keywords": [
|
|
12
|
-
"ecosystem:cordova"
|
|
13
|
-
],
|
|
14
|
-
"author": "Regula Forensics Inc.",
|
|
15
|
-
"license": "commercial",
|
|
16
11
|
"dependencies": {
|
|
17
|
-
"@regulaforensics/face-sdk": "6.4.
|
|
18
|
-
"@regulaforensics/face-core-basic": "
|
|
19
|
-
"cordova-android": "
|
|
20
|
-
"cordova-ios": "7.
|
|
12
|
+
"@regulaforensics/face-sdk": "6.4.206-rc",
|
|
13
|
+
"@regulaforensics/face-core-basic": "7.1.117-rc",
|
|
14
|
+
"cordova-android": "13.0.0",
|
|
15
|
+
"cordova-ios": "7.1.1",
|
|
21
16
|
"cordova-plugin-add-swift-support": "2.0.2",
|
|
22
|
-
"cordova-plugin-camera": "
|
|
23
|
-
"jetifier": "2.0.0",
|
|
17
|
+
"cordova-plugin-camera": "8.0.0",
|
|
24
18
|
"cordova-plugin-dialogs": "2.0.2",
|
|
25
|
-
"cordova-plugin-file": "8.
|
|
19
|
+
"cordova-plugin-file": "8.1.3"
|
|
26
20
|
},
|
|
27
21
|
"cordova": {
|
|
28
22
|
"plugins": {
|
|
@@ -37,4 +31,4 @@
|
|
|
37
31
|
"ios"
|
|
38
32
|
]
|
|
39
33
|
}
|
|
40
|
-
}
|
|
34
|
+
}
|
|
@@ -15,7 +15,7 @@ async function startLiveness() {
|
|
|
15
15
|
}
|
|
16
16
|
})
|
|
17
17
|
if (response.image == null) return
|
|
18
|
-
setImage(response.image, ImageType.LIVE, 1)
|
|
18
|
+
setImage("data:image/png;base64," + response.image, ImageType.LIVE, 1)
|
|
19
19
|
setLivenessStatus(response.liveness == LivenessStatus.PASSED ? "passed" : "unknown")
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -64,12 +64,12 @@ function setImage(base64, type, position) {
|
|
|
64
64
|
var mfImage = new MatchFacesImage(base64, type)
|
|
65
65
|
if (position == 1) {
|
|
66
66
|
image1 = mfImage
|
|
67
|
-
setUiImage1(
|
|
67
|
+
setUiImage1(base64)
|
|
68
68
|
setLivenessStatus("null")
|
|
69
69
|
}
|
|
70
70
|
if (position == 2) {
|
|
71
71
|
image2 = mfImage
|
|
72
|
-
setUiImage2(
|
|
72
|
+
setUiImage2(base64)
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -77,7 +77,7 @@ async function useCamera(position) {
|
|
|
77
77
|
var response = await faceSdk.startFaceCapture()
|
|
78
78
|
if (response.image == null) return
|
|
79
79
|
var image = response.image
|
|
80
|
-
setImage(image.image, image.imageType, position)
|
|
80
|
+
setImage("data:image/png;base64," + image.image, image.imageType, position)
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
function useGallery(position) {
|
|
@@ -100,15 +100,15 @@ function pickImage(position) {
|
|
|
100
100
|
|
|
101
101
|
async function loadAssetIfExists(path) {
|
|
102
102
|
path = cordova.file.applicationDirectory + "www/" + path
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
return new Promise((resolve, _) => {
|
|
104
|
+
window.resolveLocalFileSystemURL(path, (fileEntry) => {
|
|
105
|
+
fileEntry.file((file) => {
|
|
106
|
+
var reader = new FileReader()
|
|
107
|
+
reader.onloadend = function (_) { resolve(this.result) }
|
|
108
|
+
reader.readAsDataURL(file)
|
|
109
|
+
})
|
|
110
|
+
}, (_) => resolve(null))
|
|
111
|
+
})
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
async function onDeviceReady() {
|
package/examples/ionic/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
## How to build demo application
|
|
4
4
|
1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/npm-face-sdk.git`.
|
|
5
5
|
|
|
6
|
-
2.
|
|
6
|
+
2. Execute `npm run setup` within this directory.
|
|
7
7
|
|
|
8
8
|
3. Run the app:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* IOS: `npm run ios`.
|
|
10
|
+
* Android: `npm run android`.
|
|
11
11
|
|
|
12
|
-
**Note**: this is just one way of running the app. You can also
|
|
12
|
+
**Note**: this is just one way of running the app. You can also pass `-o` or `--open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## How to use offine match
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
<application android:usesCleartextTraffic="true" />
|
|
26
26
|
</edit-config>
|
|
27
27
|
|
|
28
|
-
<preference name="android-minSdkVersion" value="
|
|
29
|
-
<preference name="android-targetSdkVersion" value="
|
|
28
|
+
<preference name="android-minSdkVersion" value="23" />
|
|
29
|
+
<preference name="android-targetSdkVersion" value="35" />
|
|
30
30
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
31
31
|
|
|
32
32
|
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"author": "Ionic Framework",
|
|
5
5
|
"homepage": "https://ionicframework.com/",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"setup": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"setup": "scripts/setup.sh",
|
|
8
|
+
"ios": "scripts/ios.sh",
|
|
9
|
+
"android": "scripts/android.sh",
|
|
10
10
|
"ng": "ng",
|
|
11
11
|
"start": "ng serve",
|
|
12
12
|
"build": "ng build",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@regulaforensics/face-sdk": "6.4.
|
|
20
|
-
"@regulaforensics/face-core-basic": "
|
|
21
|
-
"cordova-plugin-camera": "
|
|
22
|
-
"@awesome-cordova-plugins/camera": "6.
|
|
23
|
-
"@awesome-cordova-plugins/core": "6.
|
|
24
|
-
"@awesome-cordova-plugins/dialogs": "6.
|
|
25
|
-
"@awesome-cordova-plugins/splash-screen": "6.
|
|
26
|
-
"@awesome-cordova-plugins/status-bar": "6.
|
|
27
|
-
"@awesome-cordova-plugins/file": "6.
|
|
19
|
+
"@regulaforensics/face-sdk": "6.4.206-rc",
|
|
20
|
+
"@regulaforensics/face-core-basic": "7.1.117-rc",
|
|
21
|
+
"cordova-plugin-camera": "8.0.0",
|
|
22
|
+
"@awesome-cordova-plugins/camera": "6.14.0",
|
|
23
|
+
"@awesome-cordova-plugins/core": "6.14.0",
|
|
24
|
+
"@awesome-cordova-plugins/dialogs": "6.14.0",
|
|
25
|
+
"@awesome-cordova-plugins/splash-screen": "6.14.0",
|
|
26
|
+
"@awesome-cordova-plugins/status-bar": "6.14.0",
|
|
27
|
+
"@awesome-cordova-plugins/file": "6.14.0",
|
|
28
28
|
"@angular/common": "~13.3.2",
|
|
29
29
|
"@angular/core": "~13.3.2",
|
|
30
30
|
"@angular/forms": "~13.3.2",
|
|
@@ -33,16 +33,15 @@
|
|
|
33
33
|
"@angular/router": "~13.3.2",
|
|
34
34
|
"@ionic/angular": "^6.0.15",
|
|
35
35
|
"@ionic/cordova-builders": "^6.1.0",
|
|
36
|
-
"cordova-android": "
|
|
37
|
-
"cordova-ios": "
|
|
36
|
+
"cordova-android": "13.0.0",
|
|
37
|
+
"cordova-ios": "7.1.1",
|
|
38
38
|
"cordova-plugin-add-swift-support": "^2.0.2",
|
|
39
39
|
"cordova-plugin-dialogs": "^2.0.2",
|
|
40
40
|
"core-js": "^3.6.5",
|
|
41
41
|
"rxjs": "~6.6.3",
|
|
42
42
|
"tslib": "^2.0.1",
|
|
43
43
|
"zone.js": "~0.11.1",
|
|
44
|
-
"
|
|
45
|
-
"cordova-plugin-file": "8.0.1"
|
|
44
|
+
"cordova-plugin-file": "8.1.3"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@angular-devkit/architect": "~0.1001.4",
|
|
@@ -58,7 +57,7 @@
|
|
|
58
57
|
"@types/jasminewd2": "~2.0.8",
|
|
59
58
|
"@types/node": "~14.11.5",
|
|
60
59
|
"codelyzer": "^6.0.1",
|
|
61
|
-
"cordova-plugin-device": "^
|
|
60
|
+
"cordova-plugin-device": "^3.0.0",
|
|
62
61
|
"cordova-plugin-ionic-keyboard": "^2.2.0",
|
|
63
62
|
"cordova-plugin-ionic-webview": "^5.0.0",
|
|
64
63
|
"cordova-plugin-splashscreen": "^6.0.0",
|