@regulaforensics/face-sdk 7.1.274-rc → 7.1.277-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 +1 -1
- package/examples/capacitor/package.json +2 -2
- package/examples/capacitor/src/main.css +9 -3
- package/examples/capacitor/src/main.html +15 -12
- package/examples/cordova/package.json +2 -2
- package/examples/cordova/www/src/main.css +9 -3
- package/examples/cordova/www/src/main.html +15 -12
- package/examples/ionic/package.json +2 -2
- package/examples/ionic/src/main.css +9 -3
- package/examples/ionic/src/main.html +15 -12
- package/examples/{react-native → react_native}/README.md +2 -2
- package/examples/react_native/app.config.ts +38 -0
- package/examples/react_native/images/icon/adaptive-icon.png +0 -0
- package/examples/react_native/images/icon/icon.png +0 -0
- package/examples/react_native/index.tsx +52 -0
- package/examples/react_native/metro.config.js +7 -0
- package/examples/{react-native → react_native}/package-lock.json +3927 -2812
- package/examples/react_native/package.json +26 -0
- package/examples/{react-native → react_native}/scripts/android.sh +2 -3
- package/examples/{react-native → react_native}/scripts/ios.sh +3 -4
- package/examples/react_native/scripts/setup.sh +10 -0
- package/examples/{react-native → react_native}/src/main.css +9 -3
- package/examples/react_native/src/main.html +25 -0
- package/examples/{react-native → react_native}/src/main.tsx +2 -2
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/examples/react-native/.vscode/launch.json +0 -26
- package/examples/react-native/Gemfile +0 -16
- package/examples/react-native/Gemfile.lock +0 -144
- package/examples/react-native/android/app/build.gradle +0 -55
- package/examples/react-native/android/app/debug.keystore +0 -0
- package/examples/react-native/android/app/src/main/AndroidManifest.xml +0 -27
- package/examples/react-native/android/app/src/main/java/com/regula/documentreader/MainActivity.kt +0 -22
- package/examples/react-native/android/app/src/main/java/com/regula/documentreader/MainApplication.kt +0 -44
- package/examples/react-native/android/app/src/main/res/drawable/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/drawable/ic_launcher_round.png +0 -0
- package/examples/react-native/android/build.gradle +0 -21
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/examples/react-native/android/gradle.properties +0 -5
- package/examples/react-native/android/gradlew +0 -251
- package/examples/react-native/android/gradlew.bat +0 -92
- package/examples/react-native/android/settings.gradle +0 -6
- package/examples/react-native/index.tsx +0 -51
- package/examples/react-native/ios/.xcode.env +0 -11
- package/examples/react-native/ios/App/AppDelegate.h +0 -6
- package/examples/react-native/ios/App/AppDelegate.mm +0 -31
- package/examples/react-native/ios/App/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/examples/react-native/ios/App/Images.xcassets/Contents.json +0 -6
- package/examples/react-native/ios/App/Info.plist +0 -51
- package/examples/react-native/ios/App/LaunchScreen.storyboard +0 -47
- package/examples/react-native/ios/App/PrivacyInfo.xcprivacy +0 -38
- package/examples/react-native/ios/App/main.m +0 -10
- package/examples/react-native/ios/App.xcodeproj/project.pbxproj +0 -502
- package/examples/react-native/ios/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme +0 -70
- package/examples/react-native/ios/App.xcworkspace/contents.xcworkspacedata +0 -10
- package/examples/react-native/ios/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/examples/react-native/ios/Podfile +0 -37
- package/examples/react-native/ios/Podfile.lock +0 -1891
- package/examples/react-native/ios/license/.gitkeep +0 -0
- package/examples/react-native/metro.config.js +0 -20
- package/examples/react-native/package.json +0 -22
- package/examples/react-native/patches/react-native-webview+13.13.5.patch +0 -36
- package/examples/react-native/scripts/setup.sh +0 -8
- package/examples/react-native/src/main.html +0 -22
- /package/examples/{react-native/android/app/src/main → react_native}/assets/.gitkeep +0 -0
- /package/examples/{react-native → react_native}/images/portrait.png +0 -0
- /package/examples/{react-native → react_native}/index.html +0 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This plugin makes possible to use it with react-native, cordova and ionic applic
|
|
|
4
4
|
|
|
5
5
|
## Demo applications
|
|
6
6
|
In the [examples](examples/) folder you can find 4 demo applications:
|
|
7
|
-
* [React-native](examples/
|
|
7
|
+
* [React-native](examples/react_native)
|
|
8
8
|
* [Cordova](examples/cordova)
|
|
9
9
|
* [Ionic(ionic app with cordova, angular)](examples/ionic)
|
|
10
10
|
* [Capacitor(ionic app with capacitor, react)](examples/capacitor)
|
package/RNFaceSDK.podspec
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "7.1.
|
|
10
|
-
"@regulaforensics/face-core-basic": "7.1.
|
|
9
|
+
"@regulaforensics/face-sdk": "7.1.277-beta",
|
|
10
|
+
"@regulaforensics/face-core-basic": "7.1.99-beta",
|
|
11
11
|
"@awesome-cordova-plugins/file": "6.6.0",
|
|
12
12
|
"@awesome-cordova-plugins/camera": "6.6.0",
|
|
13
13
|
"cordova-plugin-file": "8.1.3",
|
|
@@ -32,14 +32,20 @@ body {
|
|
|
32
32
|
padding-top: 80px;
|
|
33
33
|
margin-top: -10px;
|
|
34
34
|
background-color: rgba(0, 0, 0, 0.03);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.title {
|
|
38
35
|
font-weight: 600;
|
|
39
36
|
font-size: 18px;
|
|
40
37
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
41
38
|
}
|
|
42
39
|
|
|
40
|
+
.sub-header {
|
|
41
|
+
background-color: rgba(0, 0, 0, 0.03);
|
|
42
|
+
width: 100%;
|
|
43
|
+
padding-top: 13px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-weight: 550;
|
|
46
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
.divider {
|
|
44
50
|
height: 1px;
|
|
45
51
|
background-color: rgba(0, 0, 0, 0.075);
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
<div class="page">
|
|
2
2
|
<div class="column header">
|
|
3
|
-
<span id="status"
|
|
3
|
+
<span id="status">Loading...</span>
|
|
4
4
|
<div class="column divider"></div>
|
|
5
5
|
</div>
|
|
6
|
-
<div
|
|
7
|
-
<div class="
|
|
8
|
-
<
|
|
9
|
-
<
|
|
6
|
+
<div class="column sub-header">
|
|
7
|
+
<div class="row" style="width: 100%">
|
|
8
|
+
<div style="width: 185px">Similarity: <span id="similarity-status">null</span></div>
|
|
9
|
+
<div style="width: 185px">Liveness: <span id="liveness-status">null</span></div>
|
|
10
10
|
</div>
|
|
11
|
-
<div class="column
|
|
11
|
+
<div class="column divider"></div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="column no-scroll">
|
|
14
|
+
<div class="row" style="height: 100%">
|
|
15
|
+
<img id="first-image" src="images/portrait.png" width="175px" style="padding: 5px">
|
|
16
|
+
<img id="second-image" src="images/portrait.png" width="175px" style="padding: 5px">
|
|
17
|
+
</div>
|
|
18
|
+
<div class="row">
|
|
12
19
|
<button id="match-faces" class="button">Match</button>
|
|
13
20
|
<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
21
|
</div>
|
|
20
|
-
<
|
|
22
|
+
<button id="clear-results" class="button" style="width: 360px">Clear</button>
|
|
23
|
+
<div style="padding-top: 30px"></div>
|
|
21
24
|
</div>
|
|
22
25
|
</div>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "7.1.
|
|
10
|
-
"@regulaforensics/face-core-basic": "7.1.
|
|
9
|
+
"@regulaforensics/face-sdk": "7.1.277-beta",
|
|
10
|
+
"@regulaforensics/face-core-basic": "7.1.99-beta",
|
|
11
11
|
"cordova-ios": "7.1.1",
|
|
12
12
|
"cordova-android": "13.0.0",
|
|
13
13
|
"cordova-plugin-file": "8.1.3",
|
|
@@ -32,14 +32,20 @@ body {
|
|
|
32
32
|
padding-top: 80px;
|
|
33
33
|
margin-top: -10px;
|
|
34
34
|
background-color: rgba(0, 0, 0, 0.03);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.title {
|
|
38
35
|
font-weight: 600;
|
|
39
36
|
font-size: 18px;
|
|
40
37
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
41
38
|
}
|
|
42
39
|
|
|
40
|
+
.sub-header {
|
|
41
|
+
background-color: rgba(0, 0, 0, 0.03);
|
|
42
|
+
width: 100%;
|
|
43
|
+
padding-top: 13px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-weight: 550;
|
|
46
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
.divider {
|
|
44
50
|
height: 1px;
|
|
45
51
|
background-color: rgba(0, 0, 0, 0.075);
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
<div class="page">
|
|
2
2
|
<div class="column header">
|
|
3
|
-
<span id="status"
|
|
3
|
+
<span id="status">Loading...</span>
|
|
4
4
|
<div class="column divider"></div>
|
|
5
5
|
</div>
|
|
6
|
-
<div
|
|
7
|
-
<div class="
|
|
8
|
-
<
|
|
9
|
-
<
|
|
6
|
+
<div class="column sub-header">
|
|
7
|
+
<div class="row" style="width: 100%">
|
|
8
|
+
<div style="width: 185px">Similarity: <span id="similarity-status">null</span></div>
|
|
9
|
+
<div style="width: 185px">Liveness: <span id="liveness-status">null</span></div>
|
|
10
10
|
</div>
|
|
11
|
-
<div class="column
|
|
11
|
+
<div class="column divider"></div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="column no-scroll">
|
|
14
|
+
<div class="row" style="height: 100%">
|
|
15
|
+
<img id="first-image" src="images/portrait.png" width="175px" style="padding: 5px">
|
|
16
|
+
<img id="second-image" src="images/portrait.png" width="175px" style="padding: 5px">
|
|
17
|
+
</div>
|
|
18
|
+
<div class="row">
|
|
12
19
|
<button id="match-faces" class="button">Match</button>
|
|
13
20
|
<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
21
|
</div>
|
|
20
|
-
<
|
|
22
|
+
<button id="clear-results" class="button" style="width: 360px">Clear</button>
|
|
23
|
+
<div style="padding-top: 30px"></div>
|
|
21
24
|
</div>
|
|
22
25
|
</div>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "7.1.
|
|
10
|
-
"@regulaforensics/face-core-basic": "7.1.
|
|
9
|
+
"@regulaforensics/face-sdk": "7.1.277-beta",
|
|
10
|
+
"@regulaforensics/face-core-basic": "7.1.99-beta",
|
|
11
11
|
"@awesome-cordova-plugins/file": "6.16.0",
|
|
12
12
|
"@awesome-cordova-plugins/camera": "6.16.0",
|
|
13
13
|
"@awesome-cordova-plugins/dialogs": "6.16.0",
|
|
@@ -32,14 +32,20 @@ body {
|
|
|
32
32
|
padding-top: 80px;
|
|
33
33
|
margin-top: -10px;
|
|
34
34
|
background-color: rgba(0, 0, 0, 0.03);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.title {
|
|
38
35
|
font-weight: 600;
|
|
39
36
|
font-size: 18px;
|
|
40
37
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
41
38
|
}
|
|
42
39
|
|
|
40
|
+
.sub-header {
|
|
41
|
+
background-color: rgba(0, 0, 0, 0.03);
|
|
42
|
+
width: 100%;
|
|
43
|
+
padding-top: 13px;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-weight: 550;
|
|
46
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
.divider {
|
|
44
50
|
height: 1px;
|
|
45
51
|
background-color: rgba(0, 0, 0, 0.075);
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
<div class="page">
|
|
2
2
|
<div class="column header">
|
|
3
|
-
<span id="status"
|
|
3
|
+
<span id="status">Loading...</span>
|
|
4
4
|
<div class="column divider"></div>
|
|
5
5
|
</div>
|
|
6
|
-
<div
|
|
7
|
-
<div class="
|
|
8
|
-
<
|
|
9
|
-
<
|
|
6
|
+
<div class="column sub-header">
|
|
7
|
+
<div class="row" style="width: 100%">
|
|
8
|
+
<div style="width: 185px">Similarity: <span id="similarity-status">null</span></div>
|
|
9
|
+
<div style="width: 185px">Liveness: <span id="liveness-status">null</span></div>
|
|
10
10
|
</div>
|
|
11
|
-
<div class="column
|
|
11
|
+
<div class="column divider"></div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="column no-scroll">
|
|
14
|
+
<div class="row" style="height: 100%">
|
|
15
|
+
<img id="first-image" src="images/portrait.png" width="175px" style="padding: 5px">
|
|
16
|
+
<img id="second-image" src="images/portrait.png" width="175px" style="padding: 5px">
|
|
17
|
+
</div>
|
|
18
|
+
<div class="row">
|
|
12
19
|
<button id="match-faces" class="button">Match</button>
|
|
13
20
|
<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
21
|
</div>
|
|
20
|
-
<
|
|
22
|
+
<button id="clear-results" class="button" style="width: 360px">Clear</button>
|
|
23
|
+
<div style="padding-top: 30px"></div>
|
|
21
24
|
</div>
|
|
22
25
|
</div>
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## How to use offline match
|
|
16
|
-
1. Place a license that supports offline match at `
|
|
16
|
+
1. Place a license that supports offline match at `assets/regula.license`.
|
|
17
17
|
|
|
18
18
|
2. Change core with the following commands:
|
|
19
19
|
```bash
|
|
20
20
|
npm uninstall @regulaforensics/face-core-basic
|
|
21
21
|
npm install @regulaforensics/face-core-match
|
|
22
|
-
|
|
22
|
+
npm run setup
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
3. Turn off the internet and run the app.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ExpoConfig, ConfigContext } from 'expo/config'
|
|
2
|
+
|
|
3
|
+
export default ({ config }: ConfigContext): ExpoConfig => ({
|
|
4
|
+
...config,
|
|
5
|
+
slug: 'face-sdk',
|
|
6
|
+
name: 'FaceSDK',
|
|
7
|
+
orientation: 'portrait',
|
|
8
|
+
icon: './images/icon/icon.png',
|
|
9
|
+
ios: {
|
|
10
|
+
bundleIdentifier: 'com.regula.documentreader.qa',
|
|
11
|
+
infoPlist: {
|
|
12
|
+
NSCameraUsageDescription: 'To use camera',
|
|
13
|
+
NSPhotoLibraryUsageDescription: 'To use gallery'
|
|
14
|
+
},
|
|
15
|
+
appleTeamId: ''
|
|
16
|
+
},
|
|
17
|
+
android: {
|
|
18
|
+
package: 'com.regula.documentreader.api.androidtest',
|
|
19
|
+
adaptiveIcon: {
|
|
20
|
+
foregroundImage: './images/icon/adaptive-icon.png',
|
|
21
|
+
backgroundColor: '#ffffff'
|
|
22
|
+
},
|
|
23
|
+
edgeToEdgeEnabled: true
|
|
24
|
+
},
|
|
25
|
+
plugins: [
|
|
26
|
+
['expo-custom-assets', { assetsPaths: ['./assets'] }],
|
|
27
|
+
['expo-build-properties', {
|
|
28
|
+
android: {
|
|
29
|
+
extraMavenRepos: [
|
|
30
|
+
{ url: 'https://maven.regulaforensics.com/RegulaDocumentReader' },
|
|
31
|
+
{ url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Beta' },
|
|
32
|
+
{ url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Nightly' },
|
|
33
|
+
{ url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Stage' }
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}]
|
|
37
|
+
]
|
|
38
|
+
})
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { registerRootComponent } from 'expo'
|
|
2
|
+
import WebView from 'react-native-webview'
|
|
3
|
+
import { onload } from './src/main'
|
|
4
|
+
|
|
5
|
+
var webViewRef: any
|
|
6
|
+
const onclicks: any = {}
|
|
7
|
+
const onMessage = (json: any) => {
|
|
8
|
+
const event = JSON.parse(json.nativeEvent.data)
|
|
9
|
+
if (event.id === "ready") onload()
|
|
10
|
+
if (event.id === "onclick") {
|
|
11
|
+
onclicks[event.value]()
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const document = {
|
|
16
|
+
getElementById(id: string): any {
|
|
17
|
+
return new Proxy({}, {
|
|
18
|
+
set(_, prop: string, value) {
|
|
19
|
+
if (prop == "onclick") {
|
|
20
|
+
onclicks[id] = value
|
|
21
|
+
webViewRef.injectJavaScript(`
|
|
22
|
+
document.getElementById("${id}").onclick = () => {
|
|
23
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({ id: "onclick", value: "${id}" }));
|
|
24
|
+
}; true
|
|
25
|
+
`)
|
|
26
|
+
} else
|
|
27
|
+
webViewRef.injectJavaScript(`document.getElementById("${id}").${prop} = "${value}"; true`)
|
|
28
|
+
return true
|
|
29
|
+
},
|
|
30
|
+
get(_, prop: string) {
|
|
31
|
+
if (prop === "style") return new Proxy({}, {
|
|
32
|
+
set(_, styleProp: string, value) {
|
|
33
|
+
webViewRef.injectJavaScript(`document.getElementById("${id}").style.${styleProp} = "${value}"; true`)
|
|
34
|
+
return true
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
return undefined
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
registerRootComponent(() =>
|
|
45
|
+
<WebView
|
|
46
|
+
ref={ref => { webViewRef = ref }}
|
|
47
|
+
onMessage={onMessage}
|
|
48
|
+
source={require("./index.html")}
|
|
49
|
+
scrollEnabled={false}
|
|
50
|
+
injectedJavaScript="document.body.addEventListener('touchmove', function(e) { e.preventDefault() }, { passive: false })"
|
|
51
|
+
/>
|
|
52
|
+
)
|