assentify-sdk-react-native 1.0.0-Beta.4 → 1.0.0-Beta.41
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 +172 -0
- package/README.md +124 -32
- package/android/build.gradle +1 -6
- package/android/src/main/java/com/assentifysdk/AssentifySdkModule.kt +48 -9
- package/android/src/main/java/com/assentifysdk/FlowActivity.kt +75 -7
- package/android/src/main/java/com/assentifysdk/ScanIDActivity.kt +67 -6
- package/android/src/main/java/com/assentifysdk/ScanPassportActivity.kt +53 -1
- package/android/src/main/res/layout/activity_scan.xml +45 -57
- package/ios/AssentifySdkBaseModule.swift +1 -0
- package/ios/NativeAssentifySdk.mm +19 -2
- package/ios/NativeAssentifySdk.swift +151 -25
- package/ios/UIComponents/RNPassportScanner.swift +4 -3
- package/ios/View/AssentifySdkEventEmitting.swift +10 -0
- package/ios/View/DataDecoder.swift +16 -16
- package/ios/View/FaceMatchController.swift +51 -51
- package/ios/View/IDCardController.swift +93 -37
- package/ios/View/OtherController.swift +33 -33
- package/ios/View/PassportController.swift +84 -36
- package/ios/View/QrController.swift +10 -10
- package/ios/View/UI.swift +77 -26
- package/lib/commonjs/AssentifyProvider.js +3 -0
- package/lib/commonjs/AssentifyProvider.js.map +1 -1
- package/lib/commonjs/AssentifyWrapper.js +4 -4
- package/lib/commonjs/AssentifyWrapper.js.map +1 -1
- package/lib/commonjs/ClickFontWeightType.js +14 -0
- package/lib/commonjs/ClickFontWeightType.js.map +1 -0
- package/lib/commonjs/FlowStepperType.js +11 -0
- package/lib/commonjs/FlowStepperType.js.map +1 -0
- package/lib/commonjs/Language.js +5 -1
- package/lib/commonjs/Language.js.map +1 -1
- package/lib/commonjs/ValidationStyleType.js +11 -0
- package/lib/commonjs/ValidationStyleType.js.map +1 -0
- package/lib/commonjs/index.js +36 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/AssentifyProvider.js +4 -0
- package/lib/module/AssentifyProvider.js.map +1 -1
- package/lib/module/AssentifyWrapper.js +4 -4
- package/lib/module/AssentifyWrapper.js.map +1 -1
- package/lib/module/ClickFontWeightType.js +8 -0
- package/lib/module/ClickFontWeightType.js.map +1 -0
- package/lib/module/FlowStepperType.js +5 -0
- package/lib/module/FlowStepperType.js.map +1 -0
- package/lib/module/Language.js +4 -0
- package/lib/module/Language.js.map +1 -1
- package/lib/module/ValidationStyleType.js +5 -0
- package/lib/module/ValidationStyleType.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/babel.config.d.ts +0 -1
- package/lib/typescript/example/babel.config.d.ts +36 -5
- package/lib/typescript/example/babel.config.d.ts.map +1 -1
- package/lib/typescript/example/metro.config.d.ts +9 -1
- package/lib/typescript/example/metro.config.d.ts.map +1 -1
- package/lib/typescript/example/react-native.config.d.ts +34 -3
- package/lib/typescript/example/react-native.config.d.ts.map +1 -1
- package/lib/typescript/example/src/App.d.ts.map +1 -1
- package/lib/typescript/example/src/Home.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts +2 -2
- package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts +9 -0
- package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/FlowStepperType.d.ts +6 -0
- package/lib/typescript/lib/commonjs/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Language.d.ts +6 -0
- package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts +6 -0
- package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/lib/module/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/lib/module/AssentifyWrapper.d.ts +2 -2
- package/lib/typescript/lib/module/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/lib/module/ClickFontWeightType.d.ts +8 -0
- package/lib/typescript/lib/module/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/lib/module/FlowStepperType.d.ts +5 -0
- package/lib/typescript/lib/module/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/lib/module/Language.d.ts +6 -0
- package/lib/typescript/lib/module/ValidationStyleType.d.ts +5 -0
- package/lib/typescript/lib/module/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +5 -2
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/src/AssentifyWrapper.d.ts +6 -2
- package/lib/typescript/src/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/src/ClickFontWeightType.d.ts +9 -0
- package/lib/typescript/src/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/src/FlowStepperType.d.ts +6 -0
- package/lib/typescript/src/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/src/Language.d.ts +5 -0
- package/lib/typescript/src/Language.d.ts.map +1 -1
- package/lib/typescript/src/ValidationStyleType.d.ts +6 -0
- package/lib/typescript/src/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +63 -10
- package/src/AssentifyProvider.tsx +341 -305
- package/src/AssentifyWrapper.ts +47 -6
- package/src/ClickFontWeightType.ts +10 -0
- package/src/FlowStepperType.ts +7 -0
- package/src/Language.ts +7 -0
- package/src/ValidationStyleType.ts +7 -0
- package/src/index.ts +3 -0
- package/src/types.ts +1 -0
- package/assentify-sdk.podspec +0 -44
- package/lib/typescript/example/src/navigator.d.ts +0 -4
- package/lib/typescript/example/src/navigator.d.ts.map +0 -1
package/Package.swift
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// swift-tools-version: 6.0
|
|
2
|
+
// Root SPM manifest for assentify-sdk-react-native, consumed by RN 0.87+'s
|
|
3
|
+
// `npx react-native spm` autolinking (dep root registered via
|
|
4
|
+
// example/react-native.config.js; a real app registers it via its own
|
|
5
|
+
// node_modules install instead).
|
|
6
|
+
//
|
|
7
|
+
// Three build targets:
|
|
8
|
+
// - AssentifySdkReactNative (Swift): ios/View/** + ios/Resources. Zero
|
|
9
|
+
// React dependency -- talks to the bridge layer only through the
|
|
10
|
+
// AssentifySdkEventEmitting protocol (ios/View/AssentifySdkEventEmitting.swift).
|
|
11
|
+
// Ships as plain source in this same package graph (not a precompiled
|
|
12
|
+
// xcframework/binaryTarget -- that was tried first, but a binaryTarget
|
|
13
|
+
// whose public API exposes another SPM package's types (AssentifySdk)
|
|
14
|
+
// bakes in a module reference from its OWN isolated build/resolution
|
|
15
|
+
// graph, which doesn't resolve when a consuming app's SEPARATE SPM
|
|
16
|
+
// resolution tries to use it ("module 'AssentifySdk' not found" scanning
|
|
17
|
+
// the framework's generated header). Shipping as source means AssentifySdk
|
|
18
|
+
// resolves exactly once, consistently, for the whole app graph.
|
|
19
|
+
// - AssentifySdkReactNativeBridge (Swift): NativeAssentifySdk.swift,
|
|
20
|
+
// RNPassportScanner.swift, AssentifySdkBaseModule.swift. These subclass
|
|
21
|
+
// RCTEventEmitter/RCTViewManager directly, so they need RCTEventEmitter's
|
|
22
|
+
// ObjC interface visible at compile time -- `import React` (the module
|
|
23
|
+
// name the ReactHeaders target's custom module map declares) below.
|
|
24
|
+
// - AssentifySdkReactNativeObjC (Objective-C++): NativeAssentifySdk.mm,
|
|
25
|
+
// RNPassportScanner.m, RNIOSProgressBar.*, RNTMapManager.*. These use
|
|
26
|
+
// RCT_EXTERN_MODULE, which forward-declares the bridge module by name and
|
|
27
|
+
// resolves the Swift implementation via the Objective-C runtime at
|
|
28
|
+
// startup -- there is no compile-time symbol reference between this
|
|
29
|
+
// target and the Swift ones, so neither depends on the other; both just
|
|
30
|
+
// need to end up linked into the same product.
|
|
31
|
+
//
|
|
32
|
+
// Split into three (rather than the podspec's single mixed-language pod
|
|
33
|
+
// target) because SPM cannot compile Swift + Objective-C/C++ in one target.
|
|
34
|
+
import PackageDescription
|
|
35
|
+
|
|
36
|
+
let package = Package(
|
|
37
|
+
name: "AssentifySdkReactNative",
|
|
38
|
+
// Must be >= the upstream AssentifySdk.iOS.SPM engine's own minimum
|
|
39
|
+
// (15.0) -- SPM rejects a target claiming a lower floor than a product
|
|
40
|
+
// it depends on. NOTE: RN 0.87's autolinking aggregator
|
|
41
|
+
// (generate-spm-autolinking.js) currently hardcodes iOS 15 for EVERY
|
|
42
|
+
// autolinked package with no way to raise it per-dependency, so an app
|
|
43
|
+
// consuming this library via `npx react-native spm` will need that
|
|
44
|
+
// upstream limitation fixed/configurable before this resolves cleanly
|
|
45
|
+
// end-to-end; verified locally by patching the generated aggregator.
|
|
46
|
+
platforms: [.iOS(.v15)],
|
|
47
|
+
products: [
|
|
48
|
+
.library(
|
|
49
|
+
name: "AssentifySdkReactNative",
|
|
50
|
+
targets: [
|
|
51
|
+
"AssentifySdkReactNative",
|
|
52
|
+
"AssentifySdkReactNativeBridge",
|
|
53
|
+
"AssentifySdkReactNativeObjC",
|
|
54
|
+
]
|
|
55
|
+
),
|
|
56
|
+
],
|
|
57
|
+
dependencies: [
|
|
58
|
+
// RN 0.87+'s SPM app-side pipeline materializes this locally at
|
|
59
|
+
// <appRoot>/build/xcframeworks; a self-managed dep's relative
|
|
60
|
+
// .package(path:) is resolved against the autolinker's
|
|
61
|
+
// <appRoot>/build/generated/autolinking/libs/<SwiftName> symlink, not
|
|
62
|
+
// this file's real location -- both live under <appRoot>/build, so
|
|
63
|
+
// the "../../../../" depth is fixed by that RN-tooling convention
|
|
64
|
+
// regardless of which app consumes this package.
|
|
65
|
+
.package(name: "ReactNative", path: "../../../../xcframeworks"),
|
|
66
|
+
.package(name: "React-GeneratedCode", path: "../../../../generated/ios"),
|
|
67
|
+
.package(
|
|
68
|
+
url: "https://github.com/AssentifyLTD/Assentify.SDK.iOS.SPM.git",
|
|
69
|
+
exact: "1.0.0-Beta.38"
|
|
70
|
+
),
|
|
71
|
+
],
|
|
72
|
+
targets: [
|
|
73
|
+
.target(
|
|
74
|
+
name: "AssentifySdkReactNative",
|
|
75
|
+
dependencies: [
|
|
76
|
+
.product(name: "AssentifySdk", package: "assentify.sdk.ios.spm"),
|
|
77
|
+
],
|
|
78
|
+
path: "ios",
|
|
79
|
+
sources: [
|
|
80
|
+
"View/AssentifySdkEventEmitting.swift",
|
|
81
|
+
"View/DataDecoder.swift",
|
|
82
|
+
"View/FaceMatchController.swift",
|
|
83
|
+
"View/IDCardController.swift",
|
|
84
|
+
"View/OtherController.swift",
|
|
85
|
+
"View/PassportController.swift",
|
|
86
|
+
"View/QrController.swift",
|
|
87
|
+
"View/UI.swift",
|
|
88
|
+
],
|
|
89
|
+
// Individually-listed (not `.copy("Resources")`) so the files land
|
|
90
|
+
// flat at the resource bundle's root -- a nested top-level dir
|
|
91
|
+
// literally named "Resources" alongside the bundle's own Info.plist
|
|
92
|
+
// makes Xcode's codesign misidentify the bundle as a malformed
|
|
93
|
+
// macOS Contents/Resources layout ("bundle format unrecognized,
|
|
94
|
+
// invalid, or unsuitable"), failing CodeSign at build time.
|
|
95
|
+
resources: [
|
|
96
|
+
.copy("Resources/card.gif"),
|
|
97
|
+
.copy("Resources/expire.png"),
|
|
98
|
+
.copy("Resources/id.gif"),
|
|
99
|
+
.copy("Resources/id_warning.png"),
|
|
100
|
+
.copy("Resources/info_icon.png"),
|
|
101
|
+
.copy("Resources/passport.gif"),
|
|
102
|
+
.copy("Resources/sending.png"),
|
|
103
|
+
.copy("Resources/warning.png"),
|
|
104
|
+
.copy("Resources/zoom_in.png"),
|
|
105
|
+
.copy("Resources/zoom_out.png"),
|
|
106
|
+
],
|
|
107
|
+
// See the Bridge target below: this source predates Swift 6's
|
|
108
|
+
// strict concurrency checking (main-actor isolation wasn't a
|
|
109
|
+
// compile error under the podspec's Swift 5).
|
|
110
|
+
swiftSettings: [.swiftLanguageMode(.v5)]
|
|
111
|
+
),
|
|
112
|
+
.target(
|
|
113
|
+
name: "AssentifySdkReactNativeBridge",
|
|
114
|
+
dependencies: [
|
|
115
|
+
"AssentifySdkReactNative",
|
|
116
|
+
.product(name: "AssentifySdk", package: "assentify.sdk.ios.spm"),
|
|
117
|
+
.product(name: "ReactHeaders", package: "ReactNative"),
|
|
118
|
+
.product(name: "ReactNativeHeaders", package: "ReactNative"),
|
|
119
|
+
.product(name: "ReactNativeDependenciesHeaders", package: "ReactNative"),
|
|
120
|
+
.product(name: "ReactAppHeaders", package: "React-GeneratedCode"),
|
|
121
|
+
],
|
|
122
|
+
path: "ios",
|
|
123
|
+
sources: [
|
|
124
|
+
"AssentifySdkBaseModule.swift",
|
|
125
|
+
"NativeAssentifySdk.swift",
|
|
126
|
+
"UIComponents/RNPassportScanner.swift",
|
|
127
|
+
],
|
|
128
|
+
// Matches the podspec's `swift_versions` (5.0-5.5): this source
|
|
129
|
+
// predates Swift 6 mode, which turns some existing syntax (e.g.
|
|
130
|
+
// `@objc (Name)` with a space) into hard errors instead of warnings.
|
|
131
|
+
swiftSettings: [.swiftLanguageMode(.v5)]
|
|
132
|
+
),
|
|
133
|
+
.target(
|
|
134
|
+
name: "AssentifySdkReactNativeObjC",
|
|
135
|
+
dependencies: [
|
|
136
|
+
// RCT_EXTERN_MODULE (NativeAssentifySdk.mm, RNPassportScanner.m)
|
|
137
|
+
// resolves NativeAssentifySdk/RNPassportScanner purely via the
|
|
138
|
+
// Objective-C runtime at startup -- no #import ever references
|
|
139
|
+
// the Bridge target, so nothing here creates a compile-time
|
|
140
|
+
// symbol reference to it. Without an explicit target
|
|
141
|
+
// dependency, Xcode's SPM integration doesn't guarantee this
|
|
142
|
+
// product's sibling targets all get linked into a consumer:
|
|
143
|
+
// observed in practice as this target's object linking fine
|
|
144
|
+
// while AssentifySdkReactNativeBridge's compiled Swift classes
|
|
145
|
+
// (which define those @objc names) silently drop out of the
|
|
146
|
+
// final link ("Undefined symbols: _OBJC_CLASS_$_NativeAssentifySdk").
|
|
147
|
+
// This dependency exists only to force that link edge.
|
|
148
|
+
"AssentifySdkReactNativeBridge",
|
|
149
|
+
.product(name: "ReactHeaders", package: "ReactNative"),
|
|
150
|
+
.product(name: "ReactNativeHeaders", package: "ReactNative"),
|
|
151
|
+
.product(name: "ReactNativeDependenciesHeaders", package: "ReactNative"),
|
|
152
|
+
.product(name: "ReactAppHeaders", package: "React-GeneratedCode"),
|
|
153
|
+
],
|
|
154
|
+
path: "ios",
|
|
155
|
+
sources: [
|
|
156
|
+
"NativeAssentifySdk.mm",
|
|
157
|
+
"UIComponents/RNPassportScanner.m",
|
|
158
|
+
"UIComponents/RNIOSProgressBar.m",
|
|
159
|
+
"UIComponents/RNTMapManager.m",
|
|
160
|
+
],
|
|
161
|
+
publicHeadersPath: "UIComponents",
|
|
162
|
+
cxxSettings: [
|
|
163
|
+
.define("DEBUG", .when(configuration: .debug)),
|
|
164
|
+
.define("NDEBUG", .when(configuration: .release)),
|
|
165
|
+
],
|
|
166
|
+
linkerSettings: [
|
|
167
|
+
.linkedFramework("MapKit"),
|
|
168
|
+
]
|
|
169
|
+
),
|
|
170
|
+
],
|
|
171
|
+
cxxLanguageStandard: .cxx20
|
|
172
|
+
)
|
package/README.md
CHANGED
|
@@ -56,43 +56,135 @@ yarn add assentify-sdk-react-native
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
## Installation iOS
|
|
59
|
-
**Podfile**
|
|
60
|
-
```
|
|
61
|
-
platform :ios, '18.0'
|
|
62
|
-
dynamic_frameworks = ['AssentifySdk', 'TensorFlowLiteSwift']
|
|
63
|
-
|
|
64
|
-
permissions_path = '../node_modules/react-native-permissions/ios'
|
|
65
|
-
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
|
|
66
|
-
|
|
67
|
-
pod 'SVGKit', :git => 'https://github.com/jbagaresgaray/SVGKit.git', :branch => '3.x', :modular_headers => true
|
|
68
|
-
pod 'CocoaLumberjack', :modular_headers => true
|
|
69
|
-
pod 'TensorFlowLiteSwift', '2.7.0' // If needed
|
|
70
|
-
use_frameworks!
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
pre_install do |installer|
|
|
74
|
-
installer.pod_targets.each do |pod|
|
|
75
|
-
if !dynamic_frameworks.include?(pod.name)
|
|
76
|
-
puts "Overriding the static_framework? method for #{pod.name}"
|
|
77
|
-
def pod.static_framework?;
|
|
78
|
-
true
|
|
79
|
-
end
|
|
80
|
-
def pod.build_type;
|
|
81
|
-
Pod::BuildType.static_library
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
59
|
|
|
87
|
-
|
|
60
|
+
As of this version, the underlying [AssentifySdk](https://github.com/AssentifyLTD/Assentify.SDK.iOS.SPM) native library is
|
|
61
|
+
distributed via **Swift Package Manager** instead of CocoaPods. You don't need to add it to your Podfile or install it
|
|
62
|
+
manually — the `assentify-sdk` pod declares it as an SPM dependency, and `pod install` wires the Swift package into your
|
|
63
|
+
Xcode project automatically (using React Native's built-in `spm_dependency`/autolinking support).
|
|
88
64
|
|
|
89
|
-
```swift
|
|
90
|
-
cd ios
|
|
91
|
-
pod install
|
|
92
|
-
```
|
|
93
65
|
|
|
94
66
|
## Versions
|
|
95
67
|
|
|
68
|
+
***1.0.0-Beta.41***
|
|
69
|
+
1. *ID Liveness Improvements *
|
|
70
|
+
2. *Passport Liveness Improvements *
|
|
71
|
+
|
|
72
|
+
***1.0.0-Beta.40***
|
|
73
|
+
1. *Flow Improvements*
|
|
74
|
+
|
|
75
|
+
***1.0.0-Beta.39***
|
|
76
|
+
1. *Liveness Improvements*
|
|
77
|
+
|
|
78
|
+
***1.0.0-Beta.38***
|
|
79
|
+
1. *Liveness Improvements*
|
|
80
|
+
|
|
81
|
+
***1.0.0-Beta.37***
|
|
82
|
+
1. *Flow Improvements*
|
|
83
|
+
|
|
84
|
+
***1.0.0-Beta.36***
|
|
85
|
+
1. *Flow Improvements*
|
|
86
|
+
|
|
87
|
+
***1.0.0-Beta.35***
|
|
88
|
+
1. *Flow Improvements*
|
|
89
|
+
|
|
90
|
+
***1.0.0-Beta.34***
|
|
91
|
+
1. *Flow Improvements*
|
|
92
|
+
|
|
93
|
+
***1.0.0-Beta.33***
|
|
94
|
+
1. *Questionnaire Step*
|
|
95
|
+
|
|
96
|
+
***1.0.0-Beta.32***
|
|
97
|
+
1. *Document Capture Step*
|
|
98
|
+
|
|
99
|
+
***1.0.0-Beta.31***
|
|
100
|
+
1. *"Assisted Data Entry Step" Improvements*
|
|
101
|
+
|
|
102
|
+
***1.0.0-Beta.30***
|
|
103
|
+
1. *"Assisted Data Entry Step" Improvements*
|
|
104
|
+
|
|
105
|
+
***1.0.0-Beta.29***
|
|
106
|
+
1. *Fix Date Format*
|
|
107
|
+
2. *"Assisted Data Entry Step" Improvements*
|
|
108
|
+
3. *Back Click Logic Improvements*
|
|
109
|
+
|
|
110
|
+
***1.0.0-Beta.28***
|
|
111
|
+
1. *Fix Date Format*
|
|
112
|
+
2. *"Assisted Data Entry Step" Improvements*
|
|
113
|
+
3. *Back Click Logic Improvements*
|
|
114
|
+
|
|
115
|
+
***1.0.0-Beta.27***
|
|
116
|
+
1. *UI Improvements*
|
|
117
|
+
|
|
118
|
+
***1.0.0-Beta.26***
|
|
119
|
+
1. *Support Local Passport Scan*
|
|
120
|
+
|
|
121
|
+
***1.0.0-Beta.25***
|
|
122
|
+
1. *Android Target Sdk Version 36 Support.*
|
|
123
|
+
|
|
124
|
+
***1.0.0-Beta.24***
|
|
125
|
+
1. *iOS 15+ support.*
|
|
126
|
+
|
|
127
|
+
***1.0.0-Beta.23***
|
|
128
|
+
1. *iOS: Switched from CocoaPods to Swift Package Manager (SPM) for dependency management.*
|
|
129
|
+
|
|
130
|
+
***1.0.0-Beta.22***
|
|
131
|
+
1. *Added full RTL (Right-to-Left) and LTR (Left-to-Right) , Arabic and English layout support.*
|
|
132
|
+
2. *Enhanced the slider click animation*
|
|
133
|
+
|
|
134
|
+
***1.0.0-Beta.21***
|
|
135
|
+
1. "Assisted Data Entry Step" Improvements
|
|
136
|
+
|
|
137
|
+
***1.0.0-Beta.20***
|
|
138
|
+
1. "Assisted Data Entry Step" Improvements
|
|
139
|
+
|
|
140
|
+
***1.0.0-Beta.19***
|
|
141
|
+
1. *Enhanced Flow Design*
|
|
142
|
+
2. "Assisted Data Entry Step" Improvements
|
|
143
|
+
|
|
144
|
+
***1.0.0-Beta.18***
|
|
145
|
+
1. *Enhanced Flow Design*
|
|
146
|
+
2. "Assisted Data Entry Step" Improvements
|
|
147
|
+
|
|
148
|
+
***1.0.0-Beta.17***
|
|
149
|
+
1. *Support for initializing the SDK using a file path*
|
|
150
|
+
|
|
151
|
+
***1.0.0-Beta.16***
|
|
152
|
+
1. *"Assisted Data Entry Step" Improvements*
|
|
153
|
+
|
|
154
|
+
***1.0.0-Beta.15***
|
|
155
|
+
1. *Enhanced Flow Design*
|
|
156
|
+
|
|
157
|
+
***1.0.0-Beta.14***
|
|
158
|
+
1. *Optimized Camera Preview*
|
|
159
|
+
|
|
160
|
+
***1.0.0-Beta.13***
|
|
161
|
+
1. *Optimized Face Match Experience*
|
|
162
|
+
|
|
163
|
+
***1.0.0-Beta.12***
|
|
164
|
+
1. *Optimized OTP Delivery Process*
|
|
165
|
+
|
|
166
|
+
**1.0.0-Beta.11**
|
|
167
|
+
1. *Optimized Face Match Experience*
|
|
168
|
+
|
|
169
|
+
**1.0.0-Beta.10**
|
|
170
|
+
1. *Enhanced User Experience*
|
|
171
|
+
|
|
172
|
+
**1.0.0-Beta.9**
|
|
173
|
+
1. *Support for new button design*
|
|
174
|
+
|
|
175
|
+
**1.0.0-Beta.8**
|
|
176
|
+
1. *Support for new button design*
|
|
177
|
+
|
|
178
|
+
**1.0.0-Beta.7**
|
|
179
|
+
1. *Enhanced Flow Design
|
|
180
|
+
|
|
181
|
+
**1.0.0-Beta.6**
|
|
182
|
+
1. *Enhanced Flow Design
|
|
183
|
+
|
|
184
|
+
**1.0.0-Beta.5**
|
|
185
|
+
1. *Enhanced User Experience*
|
|
186
|
+
2. *Auto Generated Signature*
|
|
187
|
+
|
|
96
188
|
**1.0.0-Beta.4**
|
|
97
189
|
1. *Enhanced User Experience*
|
|
98
190
|
|
package/android/build.gradle
CHANGED
|
@@ -23,7 +23,6 @@ def isNewArchitectureEnabled() {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
apply plugin: "com.android.library"
|
|
26
|
-
apply plugin: "kotlin-android"
|
|
27
26
|
|
|
28
27
|
def getExtOrDefault(name) {
|
|
29
28
|
return rootProject.ext.has(name)
|
|
@@ -79,10 +78,6 @@ android {
|
|
|
79
78
|
targetCompatibility JavaVersion.VERSION_17
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
kotlinOptions {
|
|
83
|
-
jvmTarget = "17"
|
|
84
|
-
}
|
|
85
|
-
|
|
86
81
|
packagingOptions {
|
|
87
82
|
pickFirst '**/libc++_shared.so'
|
|
88
83
|
pickFirst '**/libfbjni.so'
|
|
@@ -101,7 +96,7 @@ dependencies {
|
|
|
101
96
|
compileOnly("com.facebook.react:react-android")
|
|
102
97
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
103
98
|
|
|
104
|
-
implementation 'com.github.AssentifyLTD:Assentify.SDK.Android:1.0.0-Beta.
|
|
99
|
+
implementation 'com.github.AssentifyLTD:Assentify.SDK.Android:1.0.0-Beta.71'
|
|
105
100
|
|
|
106
101
|
implementation 'com.google.code.gson:gson:2.13.2'
|
|
107
102
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.9.7'
|
|
@@ -58,6 +58,7 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
58
58
|
fun initialize(
|
|
59
59
|
apiKey: String,
|
|
60
60
|
configFileName: String,
|
|
61
|
+
processJsonConfigFile: String = "",
|
|
61
62
|
performLivenessFace: Boolean? = null,
|
|
62
63
|
ENV_CustomColor: String? = null,
|
|
63
64
|
enableDetect: Boolean = true,
|
|
@@ -76,8 +77,8 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
76
77
|
iOSMinRam:Int = 2,
|
|
77
78
|
minCPUCores:Int = 6,
|
|
78
79
|
manualClickColor: String? = null,
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
countDownNumbersColor: String? = null,
|
|
81
|
+
flowUiLanguage: String? = null
|
|
81
82
|
|
|
82
83
|
) {
|
|
83
84
|
try {
|
|
@@ -96,6 +97,7 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
96
97
|
println("$tag Assentify SDK Initialized")
|
|
97
98
|
println("$tag apiKey: $apiKey")
|
|
98
99
|
println("$tag configFileName: $configFileName")
|
|
100
|
+
println("$tag processJsonConfigFile: $processJsonConfigFile")
|
|
99
101
|
println("$tag performLivenessFace: $performLivenessFace")
|
|
100
102
|
println("$tag ENV_CustomColor: $ENV_CustomColor")
|
|
101
103
|
println("$tag enableDetect: $enableDetect")
|
|
@@ -115,6 +117,7 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
115
117
|
println("$tag MinCPUCores: $minCPUCores")
|
|
116
118
|
println("$tag ManualClickColor: $manualClickColor")
|
|
117
119
|
println("$tag countDownNumbersColor: $countDownNumbersColor")
|
|
120
|
+
println("$tag flowUiLanguage: $flowUiLanguage")
|
|
118
121
|
println("$tag ==============================================")
|
|
119
122
|
|
|
120
123
|
val typeActive: ActiveLiveType = when (activeLiveType) {
|
|
@@ -138,7 +141,9 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
138
141
|
activeLivenessCheckCount = activeLivenessCheckCount,
|
|
139
142
|
faceLivenessRetryCount = faceLivenessRetryCount ,
|
|
140
143
|
minRam = minRam,
|
|
141
|
-
minCPUCores = minCPUCores
|
|
144
|
+
minCPUCores = minCPUCores,
|
|
145
|
+
flowUiLanguage = flowUiLanguage ?: "en",
|
|
146
|
+
|
|
142
147
|
)
|
|
143
148
|
|
|
144
149
|
val eventResultMap = Arguments.createMap().apply {
|
|
@@ -158,7 +163,8 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
158
163
|
environmentalConditions,
|
|
159
164
|
this,
|
|
160
165
|
performActiveLivenessFace = performLivenessFace,
|
|
161
|
-
context = reactApplicationContext
|
|
166
|
+
context = reactApplicationContext,
|
|
167
|
+
processJsonConfigFile = processJsonConfigFile
|
|
162
168
|
)
|
|
163
169
|
} catch (e: Exception) {
|
|
164
170
|
Log.e(NAME, e.toString())
|
|
@@ -306,8 +312,11 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
306
312
|
// }
|
|
307
313
|
// sendEvent("AppResult", eventResultMap)
|
|
308
314
|
this.configModel = configModel;
|
|
309
|
-
templatesByCountry =
|
|
310
|
-
|
|
315
|
+
templatesByCountry = configModel.stepMap
|
|
316
|
+
.firstOrNull { it.stepDefinition == StepsNames.IdentificationDocumentCapture }
|
|
317
|
+
?.id
|
|
318
|
+
?.let { assentifySdk.getTemplates(it) }
|
|
319
|
+
?: emptyList()
|
|
311
320
|
val eventResultMap =
|
|
312
321
|
Arguments.createMap().apply {
|
|
313
322
|
val jsonTemplates = encodeTemplatesByCountryToJson(templatesByCountry)
|
|
@@ -501,10 +510,25 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
501
510
|
holdUntilClickColors: Double? = null,
|
|
502
511
|
backgroundType: String? = null,
|
|
503
512
|
clear: Boolean? = null,
|
|
504
|
-
|
|
513
|
+
extractedDataLanguage: String,
|
|
505
514
|
enableNfc: Boolean? = null,
|
|
506
515
|
enableQr: Boolean? = null,
|
|
507
|
-
jsonBlockLoaderCustomProperties: String? = null
|
|
516
|
+
jsonBlockLoaderCustomProperties: String? = null,
|
|
517
|
+
stepperType: String? = null,
|
|
518
|
+
rangeStart: Int? = null,
|
|
519
|
+
rangeEnd: Int? = null,
|
|
520
|
+
stepperTitle: String? = null,
|
|
521
|
+
showCountDown: Boolean? = null,
|
|
522
|
+
validationStyle: String? = null,
|
|
523
|
+
stepperTitleColor: String? = null,
|
|
524
|
+
howToCapturePassportVideo: String? = null,
|
|
525
|
+
howToCaptureIDVideo: String? = null,
|
|
526
|
+
howToCaptureFaceVideo: String? = null,
|
|
527
|
+
clickFontWeight: String? = null,
|
|
528
|
+
hideBlockLoader: Boolean? = null,
|
|
529
|
+
hideWrapUp: Boolean? = null,
|
|
530
|
+
localMrzScan: Boolean? = null,
|
|
531
|
+
faceAcceptanceRate: Int? = null,
|
|
508
532
|
) {
|
|
509
533
|
val intent = Intent(reactApplicationContext, FlowActivity::class.java)
|
|
510
534
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
@@ -528,10 +552,25 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
528
552
|
)
|
|
529
553
|
intent.putExtra("angleDegreesClickColors", angleDegreesClickColors)
|
|
530
554
|
intent.putExtra("holdUntilClickColors", holdUntilClickColors)
|
|
531
|
-
intent.putExtra("
|
|
555
|
+
intent.putExtra("extractedDataLanguage", extractedDataLanguage)
|
|
532
556
|
intent.putExtra("enableNfc", enableNfc)
|
|
533
557
|
intent.putExtra("enableQr", enableQr)
|
|
534
558
|
intent.putExtra("jsonBlockLoaderCustomProperties", jsonBlockLoaderCustomProperties)
|
|
559
|
+
intent.putExtra("stepperType", stepperType)
|
|
560
|
+
intent.putExtra("rangeStart", rangeStart)
|
|
561
|
+
intent.putExtra("rangeEnd", rangeEnd)
|
|
562
|
+
intent.putExtra("stepperTitle", stepperTitle)
|
|
563
|
+
intent.putExtra("showCountDown", showCountDown)
|
|
564
|
+
intent.putExtra("validationStyle", validationStyle)
|
|
565
|
+
intent.putExtra("stepperTitleColor", stepperTitleColor)
|
|
566
|
+
intent.putExtra("howToCapturePassportVideo", howToCapturePassportVideo)
|
|
567
|
+
intent.putExtra("howToCaptureIDVideo", howToCaptureIDVideo)
|
|
568
|
+
intent.putExtra("howToCaptureFaceVideo", howToCaptureFaceVideo)
|
|
569
|
+
intent.putExtra("clickFontWeight", clickFontWeight)
|
|
570
|
+
intent.putExtra("hideBlockLoader", hideBlockLoader)
|
|
571
|
+
intent.putExtra("hideWrapUp", hideWrapUp)
|
|
572
|
+
intent.putExtra("localMrzScan", localMrzScan)
|
|
573
|
+
intent.putExtra("faceAcceptanceRate", faceAcceptanceRate)
|
|
535
574
|
reactApplicationContext.currentActivity?.startActivity(intent)
|
|
536
575
|
}
|
|
537
576
|
|
|
@@ -9,6 +9,7 @@ import com.assentify.sdk.AssentifySdk
|
|
|
9
9
|
import com.assentify.sdk.AssentifySdkObject
|
|
10
10
|
import com.assentify.sdk.Core.Constants.BackgroundType
|
|
11
11
|
import com.assentify.sdk.Core.Constants.BackgroundStyle
|
|
12
|
+
import com.assentify.sdk.Core.Constants.StepperType
|
|
12
13
|
import com.assentify.sdk.Core.Constants.FlowEnvironmentalConditions
|
|
13
14
|
import com.assentify.sdk.Flow.Models.FlowCallBack
|
|
14
15
|
import com.assentify.sdk.Flow.Models.FlowCompletedModel
|
|
@@ -16,7 +17,8 @@ import com.assentify.sdk.Flow.Models.FlowCompletedModel
|
|
|
16
17
|
import com.facebook.react.bridge.Arguments
|
|
17
18
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
18
19
|
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
19
|
-
|
|
20
|
+
import com.assentify.sdk.Core.Constants.ValidationStyle
|
|
21
|
+
import com.assentify.sdk.Core.Constants.ClickFontWeight
|
|
20
22
|
import com.google.gson.Gson
|
|
21
23
|
import com.google.gson.reflect.TypeToken
|
|
22
24
|
|
|
@@ -26,7 +28,7 @@ class FlowActivity : AppCompatActivity() , FlowCallBack {
|
|
|
26
28
|
private lateinit var reactApplicationContext: ReactApplicationContext
|
|
27
29
|
private lateinit var assentifySdk: AssentifySdk
|
|
28
30
|
|
|
29
|
-
private lateinit var
|
|
31
|
+
private lateinit var extractedDataLanguage: String;
|
|
30
32
|
private var enableNfc: Boolean = false;
|
|
31
33
|
private var enableQr: Boolean = false;
|
|
32
34
|
private var blockLoaderCustomProperties: Map<String, Any> = emptyMap()
|
|
@@ -70,8 +72,8 @@ class FlowActivity : AppCompatActivity() , FlowCallBack {
|
|
|
70
72
|
|
|
71
73
|
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
intent.getStringExtra("
|
|
75
|
+
extractedDataLanguage =
|
|
76
|
+
intent.getStringExtra("extractedDataLanguage") ?: extractedDataLanguage
|
|
75
77
|
|
|
76
78
|
enableNfc = intent.getBooleanExtra("enableNfc", false)
|
|
77
79
|
enableQr = intent.getBooleanExtra("enableQr", false)
|
|
@@ -83,6 +85,23 @@ class FlowActivity : AppCompatActivity() , FlowCallBack {
|
|
|
83
85
|
blockLoaderCustomProperties =
|
|
84
86
|
Gson().fromJson(jsonBlockLoaderCustomProperties, type) ?: emptyMap()
|
|
85
87
|
|
|
88
|
+
val stepperType = intent.getStringExtra("stepperType")
|
|
89
|
+
val rangeStart = intent.getIntExtra("rangeStart",25)
|
|
90
|
+
val rangeEnd = intent.getIntExtra("rangeEnd",50)
|
|
91
|
+
val stepperTitle = intent.getStringExtra("stepperTitle")
|
|
92
|
+
val showCountDown = intent.getBooleanExtra("showCountDown", true)
|
|
93
|
+
val validationStyle = intent.getStringExtra("validationStyle")
|
|
94
|
+
val stepperTitleColor = intent.getStringExtra("stepperTitleColor")
|
|
95
|
+
val howToCapturePassportVideo = intent.getStringExtra("howToCapturePassportVideo")
|
|
96
|
+
val howToCaptureIDVideo = intent.getStringExtra("howToCaptureIDVideo")
|
|
97
|
+
val howToCaptureFaceVideo = intent.getStringExtra("howToCaptureFaceVideo")
|
|
98
|
+
val clickFontWeight = intent.getStringExtra("clickFontWeight")
|
|
99
|
+
|
|
100
|
+
val hideBlockLoader = intent.getBooleanExtra("hideBlockLoader", false)
|
|
101
|
+
val hideWrapUp = intent.getBooleanExtra("hideWrapUp", false)
|
|
102
|
+
val localMrzScan = intent.getBooleanExtra("localMrzScan", false)
|
|
103
|
+
val faceAcceptanceRate = intent.getIntExtra("faceAcceptanceRate", 50)
|
|
104
|
+
|
|
86
105
|
// ========= 4) DEBUG LOGGING =========
|
|
87
106
|
Log.d("FlowActivity", "===== Received Extras =====")
|
|
88
107
|
Log.d("FlowActivity", "logoUrl: $logoUrl")
|
|
@@ -100,16 +119,35 @@ class FlowActivity : AppCompatActivity() , FlowCallBack {
|
|
|
100
119
|
Log.d("FlowActivity", "angleDegreesClickColors: $angleDegreesClickColors")
|
|
101
120
|
Log.d("FlowActivity", "holdUntilClickColors: $holdUntilClickColors")
|
|
102
121
|
|
|
103
|
-
Log.d("FlowActivity", "
|
|
122
|
+
Log.d("FlowActivity", "extractedDataLanguage: $extractedDataLanguage")
|
|
104
123
|
Log.d("FlowActivity", "enableNfc: $enableNfc")
|
|
105
124
|
Log.d("FlowActivity", "enableQr: $enableQr")
|
|
106
125
|
Log.d("FlowActivity", "blockLoaderCustomProperties: $blockLoaderCustomProperties")
|
|
126
|
+
Log.d("FlowActivity", "stepperType: $stepperType")
|
|
127
|
+
Log.d("FlowActivity", "rangeStart: $rangeStart")
|
|
128
|
+
Log.d("FlowActivity", "rangeEnd: $rangeEnd")
|
|
129
|
+
Log.d("FlowActivity", "stepperTitle: $stepperTitle")
|
|
130
|
+
Log.d("FlowActivity", "showCountDown: $showCountDown")
|
|
131
|
+
Log.d("FlowActivity", "validationStyle: $validationStyle")
|
|
132
|
+
Log.d("FlowActivity", "stepperTitleColor: $stepperTitleColor")
|
|
133
|
+
Log.d("FlowActivity", "howToCapturePassportVideo: $howToCapturePassportVideo")
|
|
134
|
+
Log.d("FlowActivity", "howToCaptureIDVideo: $howToCaptureIDVideo")
|
|
135
|
+
Log.d("FlowActivity", "howToCaptureFaceVideo: $howToCaptureFaceVideo")
|
|
136
|
+
Log.d("FlowActivity", "clickFontWeight: $clickFontWeight")
|
|
137
|
+
Log.d("FlowActivity", "hideBlockLoader: $hideBlockLoader")
|
|
138
|
+
Log.d("FlowActivity", "hideWrapUp: $hideWrapUp")
|
|
139
|
+
Log.d("FlowActivity", "localMrzScan: $localMrzScan")
|
|
140
|
+
Log.d("FlowActivity", "faceAcceptanceRate: $faceAcceptanceRate")
|
|
107
141
|
Log.d("FlowActivity", "================================")
|
|
108
142
|
|
|
109
143
|
val bType = BackgroundType.entries.firstOrNull {
|
|
110
144
|
it.type.equals(backgroundType, ignoreCase = true)
|
|
111
145
|
} ?: BackgroundType.Color
|
|
112
146
|
|
|
147
|
+
val sType = StepperType.entries.firstOrNull {
|
|
148
|
+
it.type.equals(stepperType, ignoreCase = true)
|
|
149
|
+
} ?: StepperType.Normal
|
|
150
|
+
|
|
113
151
|
var backgroundColor: BackgroundStyle? = null
|
|
114
152
|
var clickColor: BackgroundStyle? = null
|
|
115
153
|
|
|
@@ -137,6 +175,21 @@ class FlowActivity : AppCompatActivity() , FlowCallBack {
|
|
|
137
175
|
}
|
|
138
176
|
}
|
|
139
177
|
|
|
178
|
+
val validationStyleType = when {
|
|
179
|
+
ValidationStyle.Message.equals(validationStyle, ignoreCase = true) -> ValidationStyle.Message
|
|
180
|
+
ValidationStyle.Asterisk.equals(validationStyle, ignoreCase = true) -> ValidationStyle.Asterisk
|
|
181
|
+
else -> ValidationStyle.Message
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
val clickFontWeightType = when {
|
|
185
|
+
ClickFontWeight.Normal.equals(clickFontWeight, ignoreCase = true) -> ClickFontWeight.Normal
|
|
186
|
+
ClickFontWeight.Medium.equals(clickFontWeight, ignoreCase = true) -> ClickFontWeight.Medium
|
|
187
|
+
ClickFontWeight.Bold.equals(clickFontWeight, ignoreCase = true) -> ClickFontWeight.Bold
|
|
188
|
+
ClickFontWeight.SemiBold.equals(clickFontWeight, ignoreCase = true) -> ClickFontWeight.SemiBold
|
|
189
|
+
ClickFontWeight.ExtraBold.equals(clickFontWeight, ignoreCase = true) -> ClickFontWeight.ExtraBold
|
|
190
|
+
else -> ClickFontWeight.Normal
|
|
191
|
+
}
|
|
192
|
+
|
|
140
193
|
|
|
141
194
|
if (clear) {
|
|
142
195
|
assentifySdk.clearFlow(this@FlowActivity);
|
|
@@ -153,10 +206,25 @@ class FlowActivity : AppCompatActivity() , FlowCallBack {
|
|
|
153
206
|
backgroundType = bType,
|
|
154
207
|
backgroundColor = backgroundColor,
|
|
155
208
|
clickColor = clickColor,
|
|
156
|
-
|
|
209
|
+
extractedDataLanguage = extractedDataLanguage,
|
|
157
210
|
enableNfc = enableNfc,
|
|
158
211
|
enableQr = enableQr,
|
|
159
|
-
blockLoaderCustomProperties = blockLoaderCustomProperties
|
|
212
|
+
blockLoaderCustomProperties = blockLoaderCustomProperties,
|
|
213
|
+
stepperType = sType,
|
|
214
|
+
rangeStart = rangeStart,
|
|
215
|
+
rangeEnd = rangeEnd,
|
|
216
|
+
stepperTitle = stepperTitle!!,
|
|
217
|
+
showCountDown = showCountDown!!,
|
|
218
|
+
validationStyle = validationStyleType,
|
|
219
|
+
stepperTitleColor = stepperTitleColor!!,
|
|
220
|
+
howToCapturePassportVideo = howToCapturePassportVideo!!,
|
|
221
|
+
howToCaptureIDVideo = howToCaptureIDVideo!!,
|
|
222
|
+
howToCaptureFaceVideo = howToCaptureFaceVideo!!,
|
|
223
|
+
clickFontWeight = clickFontWeightType,
|
|
224
|
+
hideBlockLoader = hideBlockLoader,
|
|
225
|
+
hideWrapUp = hideWrapUp,
|
|
226
|
+
localMrzScan = localMrzScan,
|
|
227
|
+
faceAcceptanceRate = faceAcceptanceRate
|
|
160
228
|
);
|
|
161
229
|
assentifySdk.startFlow(
|
|
162
230
|
activityContext = this@FlowActivity,
|