@regulaforensics/face-sdk 8.4.1466-rc → 8.4.1482-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/Package.swift +1 -1
- package/android/build.gradle.kts +1 -1
- package/android/cordova.gradle.kts +1 -1
- package/android/src/main/kotlin/com/regula/plugin/face/sdk/JSONConstructor.kt +14 -7
- package/android/src/main/kotlin/com/regula/plugin/face/sdk/Utils.kt +1 -1
- package/examples/capacitor/package-lock.json +3 -558
- package/examples/capacitor/package.json +4 -3
- package/examples/ionic/package-lock.json +297 -829
- package/examples/ionic/package.json +6 -4
- package/examples/react_native/app.config.ts +3 -0
- package/examples/react_native/index.tsx +65 -35
- package/examples/react_native/metro.config.js +1 -3
- package/examples/react_native/package-lock.json +1161 -1163
- package/examples/react_native/package.json +12 -18
- package/examples/react_native/scripts/android.sh +1 -8
- package/examples/react_native/scripts/ios.sh +3 -11
- package/examples/react_native/scripts/setup.sh +0 -4
- package/examples/react_native/scripts/withoutMetroServer.js +86 -0
- package/ios/Config.swift +19 -1
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/react-native-face-sdk.podspec +2 -2
- package/test/package-lock.json +2 -5
- package/www/capacitor/index.js +2 -1
- package/www/cordova.js +1 -0
- package/www/react-native/index.js +2 -1
- package/www/types/index.d.ts +2 -1
- package/examples/react_native/index.html +0 -12
package/Package.swift
CHANGED
|
@@ -10,7 +10,7 @@ let package = Package(
|
|
|
10
10
|
.package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
|
|
11
11
|
.package(
|
|
12
12
|
url: "https://github.com/regulaforensics/FaceSDK-Swift-Package",
|
|
13
|
-
exact: "8.5.
|
|
13
|
+
exact: "8.5.5098-nightly"
|
|
14
14
|
)
|
|
15
15
|
],
|
|
16
16
|
targets: [
|
package/android/build.gradle.kts
CHANGED
|
@@ -31,7 +31,7 @@ dependencies {
|
|
|
31
31
|
//noinspection GradleDynamicVersion
|
|
32
32
|
implementation("com.facebook.react:react-native:+")
|
|
33
33
|
//noinspection GradleDependency
|
|
34
|
-
implementation("com.regula.face:api:8.4.
|
|
34
|
+
implementation("com.regula.face:api:8.4.5510") {
|
|
35
35
|
isTransitive = true
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -7,6 +7,7 @@ import android.graphics.Bitmap
|
|
|
7
7
|
import android.graphics.Point
|
|
8
8
|
import android.graphics.Rect
|
|
9
9
|
import android.graphics.Typeface
|
|
10
|
+
import android.os.Build
|
|
10
11
|
import android.util.Pair
|
|
11
12
|
import android.util.Size
|
|
12
13
|
import com.regula.facesdk.configuration.EnrollmentConfiguration
|
|
@@ -85,13 +86,19 @@ import java.lang.Float
|
|
|
85
86
|
|
|
86
87
|
// Config ------------------------------
|
|
87
88
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
@SuppressLint("DiscouragedApi")
|
|
90
|
+
fun typefaceFromJSON(it: JSONObject): Pair<Typeface?, Int?> {
|
|
91
|
+
val name = it.getString("name")
|
|
92
|
+
val font = try {
|
|
93
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
|
94
|
+
context.resources.getFont(context.resources.getIdentifier(name, "font", context.packageName))
|
|
95
|
+
else null
|
|
96
|
+
} catch (_: Exception) { null }
|
|
97
|
+
return Pair(
|
|
98
|
+
font ?: Typeface.create(name, it.optInt("style", Typeface.NORMAL)),
|
|
99
|
+
it.getIntOrNull("size")
|
|
100
|
+
)
|
|
101
|
+
}
|
|
95
102
|
|
|
96
103
|
fun faceCaptureConfigFromJSON(input: JSONObject) = input.let {
|
|
97
104
|
val result = FaceCaptureConfiguration.Builder()
|
|
@@ -158,7 +158,7 @@ fun Any.setFont(customization: Customization, value: Any) {
|
|
|
158
158
|
val uiConfig = customization.uiConfigurationLive.value!!
|
|
159
159
|
val privateFonts = uiConfig.javaClass.getDeclaredField("f")
|
|
160
160
|
privateFonts.isAccessible = true
|
|
161
|
-
val fonts = privateFonts.get(uiConfig) as HashMap<CustomizationFont, Typeface
|
|
161
|
+
val fonts = privateFonts.get(uiConfig) as HashMap<CustomizationFont, Typeface?>
|
|
162
162
|
val privateSizes = uiConfig.javaClass.getDeclaredField("g")
|
|
163
163
|
privateSizes.isAccessible = true
|
|
164
164
|
val fontsSizes = privateSizes.get(uiConfig) as HashMap<CustomizationFont, Int>
|