assentify-sdk-react-native 0.0.35 → 0.0.36
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 +3 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/assentifysdk/AssentifySdkModule.kt +10 -8
- package/android/src/main/java/com/assentifysdk/FaceMatchActivity.kt +6 -2
- package/assentify-sdk.podspec +1 -1
- package/ios/NativeAssentifySdk.swift +23 -12
- package/ios/View/FaceMatchController.swift +7 -2
- package/lib/typescript/example/src/Home.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -99,7 +99,7 @@ dependencies {
|
|
|
99
99
|
implementation "com.facebook.react:react-native:+"
|
|
100
100
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
101
101
|
|
|
102
|
-
implementation 'com.github.AssentifyLTD:Assentify.SDK.Android:0.0.
|
|
102
|
+
implementation 'com.github.AssentifyLTD:Assentify.SDK.Android:0.0.87'
|
|
103
103
|
|
|
104
104
|
/* Assentify Sdk Dependencies */
|
|
105
105
|
implementation 'com.google.code.gson:gson:2.8.9'
|
|
@@ -571,16 +571,18 @@ class AssentifySdkModule(context: ReactApplicationContext) :
|
|
|
571
571
|
val kycDocumentDetails: List<KycDocumentDetails> =
|
|
572
572
|
gson.fromJson(jsonStringKycDocumentDetails, listType)
|
|
573
573
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
574
|
+
val key0 = kycDocumentDetails.firstOrNull()
|
|
575
|
+
?.templateProcessingKeyInformation
|
|
576
|
+
|
|
577
|
+
title = if (key0 == null) title else
|
|
578
|
+
templatesByCountry
|
|
579
|
+
.asSequence()
|
|
580
|
+
.flatMap { it.templates.asSequence() }
|
|
581
|
+
.firstOrNull { t ->
|
|
582
|
+
t.kycDocumentDetails.any { kd -> kd.templateProcessingKeyInformation == key0 }
|
|
580
583
|
}
|
|
584
|
+
?.kycDocumentType ?: title
|
|
581
585
|
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
586
|
return title;
|
|
585
587
|
}
|
|
586
588
|
}
|
|
@@ -315,12 +315,16 @@ private lateinit var assentifySdk: AssentifySdk
|
|
|
315
315
|
brightnessEvents: BrightnessEvents,
|
|
316
316
|
motion: MotionType,
|
|
317
317
|
faceEvents: FaceEvents,
|
|
318
|
-
zoomType: ZoomType
|
|
318
|
+
zoomType: ZoomType,
|
|
319
|
+
detectedFaces:Int
|
|
319
320
|
) {
|
|
320
321
|
runOnUiThread {
|
|
321
322
|
if(start == false && currentActiveLiveEvents == ActiveLiveEvents.Good){
|
|
322
323
|
infoLayout.visibility = View.VISIBLE
|
|
323
|
-
if
|
|
324
|
+
if(detectedFaces > 1){
|
|
325
|
+
infoText.setText("We detected more than one face.Please keep just your face in view.")
|
|
326
|
+
infoIcon.setImageDrawable(getResources().getDrawable(R.drawable.zoom_in))
|
|
327
|
+
} else if (zoomType != ZoomType.SENDING && zoomType != ZoomType.NO_DETECT) {
|
|
324
328
|
if (zoomType == ZoomType.ZOOM_IN) {
|
|
325
329
|
infoText.setText("Please Move Closer")
|
|
326
330
|
infoIcon.setImageDrawable(getResources().getDrawable(R.drawable.zoom_in))
|
package/assentify-sdk.podspec
CHANGED
|
@@ -488,7 +488,14 @@ class NativeAssentifySdk: RCTEventEmitter ,AssentifySdkDelegate , SubmitDataDel
|
|
|
488
488
|
} else if let stringValue = value as? String {
|
|
489
489
|
stringDict[key] = stringValue
|
|
490
490
|
} else {
|
|
491
|
+
if(key.contains("OnBoardMe_FaceImageAcquisition_FaceAuthenticity") || key.contains("OnBoardMe_FaceImageAcquisition_IsSkippedStatus")){
|
|
492
|
+
if let boolValue = value as? Bool {
|
|
493
|
+
stringDict[key] = boolValue ? "true" : "false"
|
|
494
|
+
}
|
|
495
|
+
}else{
|
|
491
496
|
stringDict[key] = "\(value)"
|
|
497
|
+
}
|
|
498
|
+
|
|
492
499
|
}
|
|
493
500
|
}
|
|
494
501
|
|
|
@@ -508,20 +515,24 @@ class NativeAssentifySdk: RCTEventEmitter ,AssentifySdkDelegate , SubmitDataDel
|
|
|
508
515
|
}
|
|
509
516
|
|
|
510
517
|
func getIdTitle(kycDocumentDetails: [KycDocumentDetails]) -> String {
|
|
511
|
-
|
|
518
|
+
var title = ""
|
|
512
519
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
if kycDocumentDetails[0].templateProcessingKeyInformation == template.kycDocumentDetails[0].templateProcessingKeyInformation {
|
|
517
|
-
title = template.kycDocumentType
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
520
|
+
guard let key0 = kycDocumentDetails.first?.templateProcessingKeyInformation else {
|
|
521
|
+
return title
|
|
522
|
+
}
|
|
522
523
|
|
|
523
|
-
|
|
524
|
-
|
|
524
|
+
if let matchedTemplate = templatesByCountry?
|
|
525
|
+
.flatMap({ $0.templates })
|
|
526
|
+
.first(where: { template in
|
|
527
|
+
template.kycDocumentDetails.contains { kd in
|
|
528
|
+
kd.templateProcessingKeyInformation == key0
|
|
529
|
+
}
|
|
530
|
+
}) {
|
|
531
|
+
title = matchedTemplate.kycDocumentType
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
return title
|
|
535
|
+
}
|
|
525
536
|
|
|
526
537
|
func imageToBase64(from url: URL, completion: @escaping (String?) -> Void) {
|
|
527
538
|
|
|
@@ -248,11 +248,16 @@ class FaceMAtchController: UIViewController ,FaceMatchDelegate
|
|
|
248
248
|
triggerEvent(eventName:"onUploadFailed",dataModel:dataModel)
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
func onEnvironmentalConditionsChange(brightnessEvents: BrightnessEvents,motion: MotionType,faceEvents: FaceEvents,zoom: ZoomType) {
|
|
251
|
+
func onEnvironmentalConditionsChange(brightnessEvents: BrightnessEvents,motion: MotionType,faceEvents: FaceEvents,zoom: ZoomType, detectedFaces:Int) {
|
|
252
252
|
DispatchQueue.main.async {
|
|
253
253
|
if self.start == false && self.currentActiveLiveEvents == ActiveLiveEvents.GOOD {
|
|
254
|
+
// Detected Faces Handling
|
|
255
|
+
if (detectedFaces > 1 ) {
|
|
256
|
+
self.infoLabel?.text = "We detected more than one face.\nPlease keep just your face in view."
|
|
257
|
+
self.infoImage!.image = UIImage(named: "info_icon")
|
|
258
|
+
}
|
|
254
259
|
// Zoom Type Handling
|
|
255
|
-
|
|
260
|
+
else if (zoom != ZoomType.SENDING && zoom != ZoomType.NO_DETECT) {
|
|
256
261
|
if (zoom == ZoomType.ZOOM_IN) {
|
|
257
262
|
self.infoLabel?.text = "Please Move Closer"
|
|
258
263
|
self.infoImage!.image = UIImage(named: "zoom_in")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../../../example/src/Home.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAsBnD,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../../../example/src/Home.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAsBnD,QAAA,MAAM,IAAI,yBAkST,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assentify-sdk-react-native",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"description": "This package provides integration with Assentify's services, allowing developers to incorporate Assentify functionalities seamlessly into their applications.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|