@regulaforensics/face-sdk 6.4.263-nightly → 6.4.272-nightly
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/android/build.gradle +1 -1
- package/android/cordova.gradle +1 -1
- package/examples/capacitor/package.json +2 -2
- package/examples/cordova/package.json +2 -2
- package/examples/ionic/package.json +2 -2
- 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.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/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/examples/{react-native → react_native}/src/main.css +0 -0
- /package/examples/{react-native → react_native}/src/main.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
package/android/build.gradle
CHANGED
|
@@ -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.4.
|
|
44
|
+
implementation('com.regula.face:api:6.4.3727'){
|
|
45
45
|
transitive = true
|
|
46
46
|
}
|
|
47
47
|
}
|
package/android/cordova.gradle
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "6.4.
|
|
10
|
-
"@regulaforensics/face-core-basic": "6.4.
|
|
9
|
+
"@regulaforensics/face-sdk": "6.4.272-nightly",
|
|
10
|
+
"@regulaforensics/face-core-basic": "6.4.136-nightly",
|
|
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",
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "6.4.
|
|
10
|
-
"@regulaforensics/face-core-basic": "6.4.
|
|
9
|
+
"@regulaforensics/face-sdk": "6.4.272-nightly",
|
|
10
|
+
"@regulaforensics/face-core-basic": "6.4.136-nightly",
|
|
11
11
|
"cordova-ios": "7.1.1",
|
|
12
12
|
"cordova-android": "13.0.0",
|
|
13
13
|
"cordova-plugin-file": "8.1.3",
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/face-sdk": "6.4.
|
|
10
|
-
"@regulaforensics/face-core-basic": "6.4.
|
|
9
|
+
"@regulaforensics/face-sdk": "6.4.272-nightly",
|
|
10
|
+
"@regulaforensics/face-core-basic": "6.4.136-nightly",
|
|
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",
|
|
@@ -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
|
+
)
|