uqudosdk-react-native 3.5.0 → 3.5.1
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/CHANGELOG.md +5 -0
- package/ios/UqudoId.m +147 -153
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/ios/UqudoId.m
CHANGED
|
@@ -82,10 +82,10 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
|
|
|
82
82
|
config.readMinimumMatchLevel = [[facialRecognitionSpecification valueForKey:@"readMinimumMatchLevel"] integerValue];
|
|
83
83
|
}
|
|
84
84
|
if (facialRecognitionSpecification[@"maxAttempts"]) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
int maxAttempts = [[facialRecognitionSpecification valueForKey:@"maxAttempts"] intValue];
|
|
86
|
+
if (maxAttempts > 0) {
|
|
87
|
+
config.maxAttempts = maxAttempts;
|
|
88
|
+
}
|
|
89
89
|
}
|
|
90
90
|
if (facialRecognitionSpecification[@"allowClosedEyes"]) {
|
|
91
91
|
config.allowClosedEyes = [[facialRecognitionSpecification valueForKey:@"allowClosedEyes"] boolValue];
|
|
@@ -103,11 +103,11 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
|
|
|
103
103
|
if (facialRecognitionSpecification[@"isOneToNVerificationEnabled"]) {
|
|
104
104
|
config.enableOneToNVerification = [[facialRecognitionSpecification valueForKey:@"isOneToNVerificationEnabled"] boolValue];
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
|
|
107
107
|
if (facialRecognitionSpecification[@"enableActiveLiveness"] && [facialRecognitionSpecification[@"enableActiveLiveness"] boolValue]) {
|
|
108
108
|
config.enableActiveLiveness = YES;
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
if (facialRecognitionSpecification[@"disableLivenessGesture"]) {
|
|
112
112
|
NSString *gesture = facialRecognitionSpecification[@"disableLivenessGesture"];
|
|
113
113
|
if ([gesture isEqualToString:@"FACE_MOVE"]) {
|
|
@@ -124,18 +124,18 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
|
|
|
124
124
|
|
|
125
125
|
if(lookupConfiguration){
|
|
126
126
|
NSMutableArray *lookupDocumentTypes = [[NSMutableArray alloc] init];
|
|
127
|
-
|
|
127
|
+
if(lookupConfiguration[@"documentList"]){
|
|
128
128
|
for (NSString *document in lookupConfiguration[@"documentList"]) {
|
|
129
|
-
|
|
129
|
+
UQDocumentConfig *documentConfig = [[UQDocumentConfig alloc] initWithDocumentTypeName:document];
|
|
130
130
|
[lookupDocumentTypes addObject:[NSNumber numberWithInteger:[documentConfig documentType]]];
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (lookupDocumentTypes.count) {
|
|
134
|
+
[enrollmentBuilder enableLookup:lookupDocumentTypes];
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
[enrollmentBuilder enableLookup];
|
|
138
|
+
}
|
|
139
139
|
}
|
|
140
140
|
if (backgroundCheckConfiguration) {
|
|
141
141
|
BOOL isDisableConsent = FALSE;
|
|
@@ -175,11 +175,11 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
|
|
|
175
175
|
scanConfig.faceMinimumMatchLevel = [[document valueForKey:@"faceScanMinimumMatchLevel"] intValue];
|
|
176
176
|
}
|
|
177
177
|
if (document[@"minimumAge"]) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
int minimumAge = [[document valueForKey:@"minimumAge"] intValue];
|
|
179
|
+
if (minimumAge > 0) {
|
|
180
|
+
documentObject.enableAgeVerification = minimumAge;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
183
|
|
|
184
184
|
BOOL isEnableFrontSideReview = false;
|
|
185
185
|
BOOL isEnableBackSideReview = false;
|
|
@@ -205,27 +205,27 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
if (document[@"readingConfiguration"]) {
|
|
208
|
-
|
|
208
|
+
NSDictionary *readingConfiguration = document[@"readingConfiguration"];
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
210
|
+
UQReadingConfig *readConfig = [[UQReadingConfig alloc] init];
|
|
211
|
+
readConfig.enableReading = TRUE;
|
|
212
|
+
if (readingConfiguration[@"forceReading"]) {
|
|
213
|
+
[readConfig forceReading:[[readingConfiguration valueForKey:@"forceReading"] boolValue]];
|
|
214
|
+
}
|
|
215
|
+
if (readingConfiguration[@"forceReadingIfSupported"]) {
|
|
216
|
+
[readConfig forceReadingIfSupported:[[readingConfiguration valueForKey:@"forceReadingIfSupported"] boolValue]];
|
|
217
|
+
}
|
|
218
|
+
if (document[@"faceReadMinimumMatchLevel"]) {
|
|
219
|
+
readConfig.faceMinimumMatchLevel = [[document valueForKey:@"faceReadMinimumMatchLevel"] intValue];
|
|
220
|
+
}
|
|
221
|
+
if (readingConfiguration[@"timeoutInSeconds"]) {
|
|
222
|
+
int timeoutInSeconds = [[readingConfiguration valueForKey:@"timeoutInSeconds"] intValue];
|
|
223
|
+
if (timeoutInSeconds > 0) {
|
|
224
|
+
readConfig.forceReadingTimeout = timeoutInSeconds;
|
|
226
225
|
}
|
|
226
|
+
}
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
documentObject.reading = readConfig;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
[enrollmentBuilder add:documentObject];
|
|
@@ -317,9 +317,9 @@ RCT_EXPORT_METHOD(recover:(NSString *)recoverObj resolver:(RCTPromiseResolveBloc
|
|
|
317
317
|
|
|
318
318
|
NSInteger appearanceMode = SYSTEM;
|
|
319
319
|
if (json[@"appearanceMode"]) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
if ([json[@"appearanceMode"] isEqualToString:@"LIGHT"]) {
|
|
321
|
+
appearanceMode = LIGHT;
|
|
322
|
+
} else if ([json[@"appearanceMode"] isEqualToString:@"DARK"]) {
|
|
323
323
|
appearanceMode = DARK;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
@@ -408,11 +408,11 @@ RCT_EXPORT_METHOD(faceSession:(NSString *)configuration resolver:(RCTPromiseReso
|
|
|
408
408
|
[faceSessionBuilder enableAuditTrailImageObfuscation:FILLED_WHITE];
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
|
|
412
412
|
if (json[@"enableActiveLiveness"] && [json[@"enableActiveLiveness"] boolValue]) {
|
|
413
413
|
faceSessionBuilder.enableActiveLiveness = YES;
|
|
414
414
|
}
|
|
415
|
-
|
|
415
|
+
|
|
416
416
|
if (json[@"disableLivenessGesture"]) {
|
|
417
417
|
NSString *gesture = json[@"disableLivenessGesture"];
|
|
418
418
|
if ([gesture isEqualToString:@"FACE_MOVE"]) {
|
|
@@ -423,7 +423,7 @@ RCT_EXPORT_METHOD(faceSession:(NSString *)configuration resolver:(RCTPromiseReso
|
|
|
423
423
|
faceSessionBuilder.disableLivenessGesture = FACE_TURN;
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
|
|
426
|
+
|
|
427
427
|
builderController.delegate = self;
|
|
428
428
|
UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
|
|
429
429
|
builderController.appViewController = rootViewController;
|
|
@@ -431,11 +431,11 @@ RCT_EXPORT_METHOD(faceSession:(NSString *)configuration resolver:(RCTPromiseReso
|
|
|
431
431
|
|
|
432
432
|
NSInteger appearanceMode = SYSTEM;
|
|
433
433
|
if (json[@"appearanceMode"]) {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
434
|
+
if ([json[@"appearanceMode"] isEqualToString:@"LIGHT"]) {
|
|
435
|
+
appearanceMode = LIGHT;
|
|
436
|
+
} else if ([json[@"appearanceMode"] isEqualToString:@"DARK"]) {
|
|
437
|
+
appearanceMode = DARK;
|
|
438
|
+
}
|
|
439
439
|
}
|
|
440
440
|
[builderController setAppearanceMode:appearanceMode];
|
|
441
441
|
});
|
|
@@ -520,10 +520,10 @@ RCT_EXPORT_METHOD(lookup:(NSString *)lookupObj resolver:(RCTPromiseResolveBlock)
|
|
|
520
520
|
config.minimumMatchLevel = [[facialRecognitionSpecification valueForKey:@"lookupMinimumMatchLevel"] integerValue];
|
|
521
521
|
}
|
|
522
522
|
if (facialRecognitionSpecification[@"maxAttempts"]) {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
523
|
+
int maxAttempts = [[facialRecognitionSpecification valueForKey:@"maxAttempts"] intValue];
|
|
524
|
+
if (maxAttempts > 0) {
|
|
525
|
+
config.maxAttempts = maxAttempts;
|
|
526
|
+
}
|
|
527
527
|
}
|
|
528
528
|
if (facialRecognitionSpecification[@"allowClosedEyes"]) {
|
|
529
529
|
config.allowClosedEyes = [[facialRecognitionSpecification valueForKey:@"allowClosedEyes"] boolValue];
|
|
@@ -541,11 +541,11 @@ RCT_EXPORT_METHOD(lookup:(NSString *)lookupObj resolver:(RCTPromiseResolveBlock)
|
|
|
541
541
|
if (facialRecognitionSpecification[@"isOneToNVerificationEnabled"]) {
|
|
542
542
|
config.enableOneToNVerification = [[facialRecognitionSpecification valueForKey:@"isOneToNVerificationEnabled"] boolValue];
|
|
543
543
|
}
|
|
544
|
-
|
|
544
|
+
|
|
545
545
|
if (facialRecognitionSpecification[@"enableActiveLiveness"] && [facialRecognitionSpecification[@"enableActiveLiveness"] boolValue]) {
|
|
546
546
|
config.enableActiveLiveness = YES;
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
|
|
549
549
|
if (facialRecognitionSpecification[@"disableLivenessGesture"]) {
|
|
550
550
|
NSString *gesture = facialRecognitionSpecification[@"disableLivenessGesture"];
|
|
551
551
|
if ([gesture isEqualToString:@"FACE_MOVE"]) {
|
|
@@ -630,172 +630,166 @@ RCT_EXPORT_METHOD(lookup:(NSString *)lookupObj resolver:(RCTPromiseResolveBlock)
|
|
|
630
630
|
RCT_EXPORT_METHOD(isReadingSupported:(NSString *)documentType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
|
631
631
|
self.promiseReject = reject;
|
|
632
632
|
@try{
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
UQDocumentConfig *documentObject = [[UQDocumentConfig alloc] initWithDocumentTypeName:documentType];
|
|
634
|
+
resolve(@(documentObject.isSupportReading));
|
|
635
|
+
}
|
|
636
|
+
@catch (NSException *exception) {
|
|
637
|
+
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
638
|
+
status.statusCode = UNEXPECTED_ERROR;
|
|
639
|
+
status.message = @"Expected valid document type as argument";
|
|
640
|
+
status.statusTask = -1;
|
|
641
|
+
[self sendPluginError:status];
|
|
635
642
|
}
|
|
636
|
-
@catch (NSException *exception) {
|
|
637
|
-
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
638
|
-
status.statusCode = UNEXPECTED_ERROR;
|
|
639
|
-
status.message = @"Expected valid document type as argument";
|
|
640
|
-
status.statusTask = -1;
|
|
641
|
-
[self sendPluginError:status];
|
|
642
|
-
}
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
RCT_EXPORT_METHOD(isFacialRecognitionSupported:(NSString *)documentType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
|
646
646
|
self.promiseReject = reject;
|
|
647
647
|
@try{
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
UQDocumentConfig *documentObject = [[UQDocumentConfig alloc] initWithDocumentTypeName:documentType];
|
|
649
|
+
resolve(@(documentObject.isSupportFaceRecognition));
|
|
650
|
+
}
|
|
651
|
+
@catch (NSException *exception) {
|
|
652
|
+
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
653
|
+
status.statusCode = UNEXPECTED_ERROR;
|
|
654
|
+
status.message = @"Expected valid document type as argument";
|
|
655
|
+
status.statusTask = -1;
|
|
656
|
+
[self sendPluginError:status];
|
|
650
657
|
}
|
|
651
|
-
@catch (NSException *exception) {
|
|
652
|
-
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
653
|
-
status.statusCode = UNEXPECTED_ERROR;
|
|
654
|
-
status.message = @"Expected valid document type as argument";
|
|
655
|
-
status.statusTask = -1;
|
|
656
|
-
[self sendPluginError:status];
|
|
657
|
-
}
|
|
658
658
|
}
|
|
659
659
|
|
|
660
660
|
RCT_EXPORT_METHOD(isEnrollmentSupported:(NSString *)documentType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
|
661
661
|
self.promiseReject = reject;
|
|
662
662
|
@try{
|
|
663
|
-
|
|
664
|
-
|
|
663
|
+
UQDocumentConfig *documentObject = [[UQDocumentConfig alloc] initWithDocumentTypeName:documentType];
|
|
664
|
+
resolve(@(documentObject.isEnrollmentSupported));
|
|
665
|
+
}
|
|
666
|
+
@catch (NSException *exception) {
|
|
667
|
+
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
668
|
+
status.statusCode = UNEXPECTED_ERROR;
|
|
669
|
+
status.message = @"Expected valid document type as argument";
|
|
670
|
+
status.statusTask = -1;
|
|
671
|
+
[self sendPluginError:status];
|
|
665
672
|
}
|
|
666
|
-
@catch (NSException *exception) {
|
|
667
|
-
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
668
|
-
status.statusCode = UNEXPECTED_ERROR;
|
|
669
|
-
status.message = @"Expected valid document type as argument";
|
|
670
|
-
status.statusTask = -1;
|
|
671
|
-
[self sendPluginError:status];
|
|
672
|
-
}
|
|
673
673
|
}
|
|
674
674
|
|
|
675
675
|
RCT_EXPORT_METHOD(isLookupSupported:(NSString *)documentType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
|
676
676
|
self.promiseReject = reject;
|
|
677
677
|
@try{
|
|
678
|
-
|
|
679
|
-
|
|
678
|
+
UQDocumentConfig *documentObject = [[UQDocumentConfig alloc] initWithDocumentTypeName:documentType];
|
|
679
|
+
resolve(@(documentObject.isLookupSupported));
|
|
680
|
+
}
|
|
681
|
+
@catch (NSException *exception) {
|
|
682
|
+
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
683
|
+
status.statusCode = UNEXPECTED_ERROR;
|
|
684
|
+
status.message = @"Expected valid document type as argument";
|
|
685
|
+
status.statusTask = -1;
|
|
686
|
+
[self sendPluginError:status];
|
|
680
687
|
}
|
|
681
|
-
@catch (NSException *exception) {
|
|
682
|
-
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
683
|
-
status.statusCode = UNEXPECTED_ERROR;
|
|
684
|
-
status.message = @"Expected valid document type as argument";
|
|
685
|
-
status.statusTask = -1;
|
|
686
|
-
[self sendPluginError:status];
|
|
687
|
-
}
|
|
688
688
|
}
|
|
689
689
|
|
|
690
690
|
RCT_EXPORT_METHOD(isLookupFacialRecognitionSupported:(NSString *)documentType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
|
691
691
|
self.promiseReject = reject;
|
|
692
692
|
@try{
|
|
693
|
-
|
|
694
|
-
|
|
693
|
+
UQDocumentConfig *documentObject = [[UQDocumentConfig alloc] initWithDocumentTypeName:documentType];
|
|
694
|
+
resolve(@(documentObject.isLookupFacialRecognitionSupported));
|
|
695
|
+
}
|
|
696
|
+
@catch (NSException *exception) {
|
|
697
|
+
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
698
|
+
status.statusCode = UNEXPECTED_ERROR;
|
|
699
|
+
status.message = @"Expected valid document type as argument";
|
|
700
|
+
status.statusTask = -1;
|
|
701
|
+
[self sendPluginError:status];
|
|
695
702
|
}
|
|
696
|
-
@catch (NSException *exception) {
|
|
697
|
-
UQSessionStatus *status =[[UQSessionStatus alloc] init];
|
|
698
|
-
status.statusCode = UNEXPECTED_ERROR;
|
|
699
|
-
status.message = @"Expected valid document type as argument";
|
|
700
|
-
status.statusTask = -1;
|
|
701
|
-
[self sendPluginError:status];
|
|
702
|
-
}
|
|
703
703
|
}
|
|
704
704
|
|
|
705
705
|
RCT_EXPORT_METHOD(reading:(NSString *)readingObj resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
|
706
706
|
self.promiseResolve = resolve;
|
|
707
707
|
self.promiseReject = reject;
|
|
708
|
-
|
|
708
|
+
|
|
709
709
|
@try {
|
|
710
710
|
if (readingObj != nil && [readingObj length] > 0) {
|
|
711
711
|
UQBuilderController *builderController = [UQBuilderController defaultBuilder];
|
|
712
712
|
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
713
713
|
NSData *data = [readingObj dataUsingEncoding:NSUTF8StringEncoding];
|
|
714
714
|
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
|
|
715
|
-
|
|
715
|
+
|
|
716
716
|
UQReadingBuilder *readingBuilder = [[UQReadingBuilder alloc] init];
|
|
717
|
-
|
|
717
|
+
readingBuilder.delegate = self;
|
|
718
|
+
|
|
718
719
|
if (json[@"authorizationToken"]) {
|
|
719
|
-
|
|
720
|
+
readingBuilder.authorizationToken = json[@"authorizationToken"];
|
|
720
721
|
}
|
|
721
|
-
|
|
722
|
+
|
|
722
723
|
if (json[@"sessionId"]) {
|
|
723
|
-
|
|
724
|
+
readingBuilder.sessionID = json[@"sessionId"];
|
|
724
725
|
}
|
|
725
|
-
|
|
726
|
+
|
|
726
727
|
NSString* userIdentifier = json[@"userIdentifier"];
|
|
727
728
|
if (userIdentifier && userIdentifier.length > 0) {
|
|
728
|
-
|
|
729
|
-
if (userID) {
|
|
730
|
-
[readingBuilder setUserIdentifier:userID];
|
|
731
|
-
}
|
|
729
|
+
readingBuilder.userIdentifier = userIdentifier;
|
|
732
730
|
}
|
|
733
|
-
|
|
731
|
+
|
|
734
732
|
if (json[@"nonce"]) {
|
|
735
|
-
|
|
733
|
+
readingBuilder.nonce = json[@"nonce"];
|
|
736
734
|
}
|
|
737
|
-
|
|
735
|
+
|
|
738
736
|
if (json[@"documentType"]) {
|
|
739
737
|
UQDocumentConfig *documentObject = [[UQDocumentConfig alloc] initWithDocumentTypeName:json[@"documentType"]];
|
|
740
|
-
|
|
738
|
+
readingBuilder.documentType = documentObject.documentType;
|
|
741
739
|
}
|
|
742
|
-
|
|
740
|
+
|
|
743
741
|
if (json[@"documentNumber"]) {
|
|
744
|
-
|
|
742
|
+
readingBuilder.documentNumber = json[@"documentNumber"];
|
|
745
743
|
}
|
|
746
|
-
|
|
744
|
+
|
|
747
745
|
if (json[@"dateOfBirth"]) {
|
|
748
|
-
|
|
746
|
+
readingBuilder.dateOfBirth = json[@"dateOfBirth"];
|
|
749
747
|
}
|
|
750
|
-
|
|
748
|
+
|
|
751
749
|
if (json[@"dateOfExpiry"]) {
|
|
752
|
-
|
|
750
|
+
readingBuilder.dateOfExpiry = json[@"dateOfExpiry"];
|
|
753
751
|
}
|
|
754
|
-
|
|
752
|
+
|
|
755
753
|
if (json[@"mrz"]) {
|
|
756
754
|
readingBuilder.mrz = json[@"mrz"];
|
|
757
755
|
}
|
|
758
|
-
|
|
759
|
-
if (json[@"isReturnDataForIncompleteSession"]
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
if (json[@"isSecuredWindowsDisabled"] && [json[@"isSecuredWindowsDisabled"] boolValue]) {
|
|
764
|
-
[readingBuilder disableSecureWindow];
|
|
756
|
+
|
|
757
|
+
if (json[@"isReturnDataForIncompleteSession"]) {
|
|
758
|
+
readingBuilder.returnDataForIncompleteSession = [[json valueForKey:@"isReturnDataForIncompleteSession"] boolValue];
|
|
765
759
|
}
|
|
766
|
-
|
|
760
|
+
|
|
767
761
|
if (json[@"facialRecognitionSpecification"]) {
|
|
768
762
|
NSDictionary *frConfig = json[@"facialRecognitionSpecification"];
|
|
769
763
|
UQFacialRecognitionConfig *config = [[UQFacialRecognitionConfig alloc] init];
|
|
770
764
|
config.enableFacialRecognition = YES;
|
|
771
|
-
|
|
765
|
+
|
|
772
766
|
if (frConfig[@"enrollFace"] && [frConfig[@"enrollFace"] boolValue]) {
|
|
773
767
|
config.enrollFace = YES;
|
|
774
768
|
}
|
|
775
|
-
|
|
769
|
+
|
|
776
770
|
if (frConfig[@"scanMinimumMatchLevel"]) {
|
|
777
771
|
config.scanMinimumMatchLevel = [frConfig[@"scanMinimumMatchLevel"] intValue];
|
|
778
772
|
}
|
|
779
|
-
|
|
773
|
+
|
|
780
774
|
if (frConfig[@"readMinimumMatchLevel"]) {
|
|
781
775
|
config.readMinimumMatchLevel = [frConfig[@"readMinimumMatchLevel"] intValue];
|
|
782
776
|
}
|
|
783
|
-
|
|
777
|
+
|
|
784
778
|
if (frConfig[@"lookupMinimumMatchLevel"]) {
|
|
785
779
|
config.minimumMatchLevel = [frConfig[@"lookupMinimumMatchLevel"] intValue];
|
|
786
780
|
}
|
|
787
|
-
|
|
781
|
+
|
|
788
782
|
if (frConfig[@"maxAttempts"]) {
|
|
789
783
|
int maxAttempts = [frConfig[@"maxAttempts"] intValue];
|
|
790
784
|
if (maxAttempts > 0) {
|
|
791
785
|
config.maxAttempts = maxAttempts;
|
|
792
786
|
}
|
|
793
787
|
}
|
|
794
|
-
|
|
788
|
+
|
|
795
789
|
if (frConfig[@"allowClosedEyes"] && [frConfig[@"allowClosedEyes"] boolValue]) {
|
|
796
790
|
config.allowClosedEyes = YES;
|
|
797
791
|
}
|
|
798
|
-
|
|
792
|
+
|
|
799
793
|
if (frConfig[@"obfuscationType"]) {
|
|
800
794
|
if ([frConfig[@"obfuscationType"] isEqualToString:@"BLURRED"]) {
|
|
801
795
|
config.obfuscationType = BLURRED;
|
|
@@ -805,15 +799,15 @@ RCT_EXPORT_METHOD(reading:(NSString *)readingObj resolver:(RCTPromiseResolveBloc
|
|
|
805
799
|
config.obfuscationType = FILLED_WHITE;
|
|
806
800
|
}
|
|
807
801
|
}
|
|
808
|
-
|
|
802
|
+
|
|
809
803
|
if (frConfig[@"isOneToNVerificationEnabled"] && [frConfig[@"isOneToNVerificationEnabled"] boolValue]) {
|
|
810
804
|
config.enableOneToNVerification = YES;
|
|
811
805
|
}
|
|
812
|
-
|
|
806
|
+
|
|
813
807
|
if (frConfig[@"enableActiveLiveness"] && [frConfig[@"enableActiveLiveness"] boolValue]) {
|
|
814
808
|
config.enableActiveLiveness = YES;
|
|
815
809
|
}
|
|
816
|
-
|
|
810
|
+
|
|
817
811
|
if (frConfig[@"disableLivenessGesture"]) {
|
|
818
812
|
NSString *gesture = frConfig[@"disableLivenessGesture"];
|
|
819
813
|
if ([gesture isEqualToString:@"FACE_MOVE"]) {
|
|
@@ -824,37 +818,37 @@ RCT_EXPORT_METHOD(reading:(NSString *)readingObj resolver:(RCTPromiseResolveBloc
|
|
|
824
818
|
config.disableLivenessGesture = FACE_TURN;
|
|
825
819
|
}
|
|
826
820
|
}
|
|
827
|
-
|
|
828
|
-
|
|
821
|
+
|
|
822
|
+
readingBuilder.facialRecognitionConfig = config;
|
|
829
823
|
}
|
|
830
|
-
|
|
824
|
+
|
|
831
825
|
if (json[@"backgroundCheckConfiguration"]) {
|
|
832
826
|
NSDictionary *bgConfig = json[@"backgroundCheckConfiguration"];
|
|
833
|
-
|
|
827
|
+
|
|
834
828
|
BOOL isDisableConsent = bgConfig[@"disableConsent"] && [bgConfig[@"disableConsent"] boolValue];
|
|
835
829
|
BOOL isMonitoringEnabled = bgConfig[@"monitoringEnabled"] && [bgConfig[@"monitoringEnabled"] boolValue];
|
|
836
830
|
BOOL isSkipView = bgConfig[@"skipView"] && [bgConfig[@"skipView"] boolValue];
|
|
837
|
-
|
|
831
|
+
|
|
838
832
|
BackgroundCheckType type = RDC;
|
|
839
833
|
if (bgConfig[@"backgroundCheckType"]) {
|
|
840
834
|
if ([bgConfig[@"backgroundCheckType"] isEqualToString:@"DOW_JONES"]) {
|
|
841
835
|
type = DOW_JONES;
|
|
842
836
|
}
|
|
843
837
|
}
|
|
844
|
-
|
|
838
|
+
|
|
845
839
|
[readingBuilder enableBackgroundCheck:isDisableConsent type:type monitoring:isMonitoringEnabled skipView:isSkipView];
|
|
846
840
|
}
|
|
847
|
-
|
|
841
|
+
|
|
848
842
|
if (json[@"isLookupEnabled"] && [json[@"isLookupEnabled"] boolValue]) {
|
|
849
843
|
[readingBuilder enableLookup];
|
|
850
844
|
}
|
|
851
|
-
|
|
845
|
+
|
|
852
846
|
builderController.delegate = self;
|
|
853
847
|
[builderController setReading:readingBuilder];
|
|
854
|
-
|
|
855
|
-
UIViewController *rootViewController = UIApplication
|
|
848
|
+
|
|
849
|
+
UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
|
|
856
850
|
builderController.appViewController = rootViewController;
|
|
857
|
-
|
|
851
|
+
|
|
858
852
|
NSInteger appearanceMode = SYSTEM;
|
|
859
853
|
if (json[@"appearanceMode"]) {
|
|
860
854
|
if ([json[@"appearanceMode"] isEqualToString:@"LIGHT"]) {
|
|
@@ -970,7 +964,7 @@ RCT_EXPORT_METHOD(reading:(NSString *)readingObj resolver:(RCTPromiseResolveBloc
|
|
|
970
964
|
|
|
971
965
|
-(void)stopObserving {
|
|
972
966
|
if(tracer != nil) {
|
|
973
|
-
|
|
967
|
+
tracer.hasListeners = NO;
|
|
974
968
|
}
|
|
975
969
|
}
|
|
976
970
|
|