@regulaforensics/document-reader 9.1.484-rc → 9.1.493-beta
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/RNDocumentReader.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +8 -0
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +346 -40
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +65 -11
- package/android/src/main/java/com/regula/plugin/documentreader/Utils.kt +62 -0
- package/examples/capacitor/ios/App/App/Info.plist +2 -0
- package/examples/capacitor/package.json +1 -1
- package/examples/ionic/config.xml +2 -0
- package/examples/ionic/package-lock.json +5257 -2650
- package/examples/ionic/package.json +10 -10
- package/examples/react_native/app.config.ts +3 -1
- package/examples/react_native/package-lock.json +3 -3
- package/examples/react_native/package.json +1 -1
- package/ios/RGLWConfig.m +9 -2
- package/ios/RGLWJSONConstructor.h +19 -0
- package/ios/RGLWJSONConstructor.m +349 -0
- package/ios/RGLWMain.m +49 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +200 -95
- package/test/package-lock.json +1 -1
- package/test/test.tsx +12 -2
- package/www/capacitor/engagement/DataRetrieval.js +55 -0
- package/www/capacitor/engagement/DeviceEngagement.js +30 -0
- package/www/capacitor/engagement/DeviceRetrievalMethod.js +41 -0
- package/www/capacitor/engagement/DocumentRequestMDL.js +212 -0
- package/www/capacitor/engagement/NameSpaceMDL.js +33 -0
- package/www/capacitor/index.js +54 -2
- package/www/capacitor/info/DocReaderException.js +2 -0
- package/www/capacitor/params/Functionality.js +16 -0
- package/www/capacitor/params/customization/Customization.js +8 -0
- package/www/capacitor/params/process_params/ProcessParams.js +16 -0
- package/www/capacitor/results/Results.js +8 -1
- package/www/capacitor/results/status/AgeStatus.js +35 -0
- package/www/capacitor/results/status/ResultsStatus.js +13 -0
- package/www/capacitor/results/visible_digital_seals/DocFeature.js +23 -0
- package/www/capacitor/results/visible_digital_seals/VDSData.js +75 -0
- package/www/capacitor/results/visual_results/FieldType.js +3 -0
- package/www/capacitor/rfid/PKDCertificate.js +3 -0
- package/www/cordova.js +951 -177
- package/www/react-native/engagement/DataRetrieval.js +55 -0
- package/www/react-native/engagement/DeviceEngagement.js +30 -0
- package/www/react-native/engagement/DeviceRetrievalMethod.js +41 -0
- package/www/react-native/engagement/DocumentRequestMDL.js +212 -0
- package/www/react-native/engagement/NameSpaceMDL.js +33 -0
- package/www/react-native/index.js +54 -2
- package/www/react-native/info/DocReaderException.js +2 -0
- package/www/react-native/params/Functionality.js +16 -0
- package/www/react-native/params/customization/Customization.js +8 -0
- package/www/react-native/params/process_params/ProcessParams.js +16 -0
- package/www/react-native/results/Results.js +8 -1
- package/www/react-native/results/status/AgeStatus.js +35 -0
- package/www/react-native/results/status/ResultsStatus.js +13 -0
- package/www/react-native/results/visible_digital_seals/DocFeature.js +23 -0
- package/www/react-native/results/visible_digital_seals/VDSData.js +75 -0
- package/www/react-native/results/visual_results/FieldType.js +3 -0
- package/www/react-native/rfid/PKDCertificate.js +3 -0
- package/www/types/engagement/DataRetrieval.d.ts +28 -0
- package/www/types/engagement/DeviceEngagement.d.ts +16 -0
- package/www/types/engagement/DeviceRetrievalMethod.d.ts +18 -0
- package/www/types/engagement/DocumentRequestMDL.d.ts +61 -0
- package/www/types/engagement/NameSpaceMDL.d.ts +16 -0
- package/www/types/index.d.ts +35 -2
- package/www/types/info/DocReaderException.d.ts +2 -0
- package/www/types/params/Functionality.d.ts +7 -0
- package/www/types/params/customization/Customization.d.ts +5 -0
- package/www/types/params/process_params/ProcessParams.d.ts +13 -0
- package/www/types/results/Results.d.ts +9 -1
- package/www/types/results/status/AgeStatus.d.ts +14 -0
- package/www/types/results/status/ResultsStatus.d.ts +9 -0
- package/www/types/results/visible_digital_seals/DocFeature.d.ts +9 -0
- package/www/types/results/visible_digital_seals/VDSData.d.ts +32 -0
- package/www/types/results/visible_digital_seals/VDSNCData.d.ts +1 -1
- package/www/types/results/visual_results/FieldType.d.ts +6 -0
- package/www/types/rfid/PKDCertificate.d.ts +7 -1
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@angular-devkit/build-angular": "^
|
|
10
|
-
"@angular/cli": "^
|
|
11
|
-
"@angular/common": "^
|
|
12
|
-
"@angular/compiler-cli": "^
|
|
13
|
-
"@angular/core": "^
|
|
14
|
-
"@angular/forms": "^
|
|
15
|
-
"@angular/platform-browser-dynamic": "^
|
|
16
|
-
"@angular/router": "^
|
|
9
|
+
"@angular-devkit/build-angular": "^21.0.1",
|
|
10
|
+
"@angular/cli": "^21.0.1",
|
|
11
|
+
"@angular/common": "^21.0.2",
|
|
12
|
+
"@angular/compiler-cli": "^21.0.2",
|
|
13
|
+
"@angular/core": "^21.0.2",
|
|
14
|
+
"@angular/forms": "^21.0.2",
|
|
15
|
+
"@angular/platform-browser-dynamic": "^21.0.2",
|
|
16
|
+
"@angular/router": "^21.0.2",
|
|
17
17
|
"@awesome-cordova-plugins/camera": "^8.1.0",
|
|
18
18
|
"@awesome-cordova-plugins/file": "^8.1.0",
|
|
19
|
-
"@ionic/angular": "^8.7.
|
|
19
|
+
"@ionic/angular": "^8.7.11",
|
|
20
20
|
"@ionic/cordova-builders": "^12.3.0",
|
|
21
|
-
"@regulaforensics/document-reader": "9.1.
|
|
21
|
+
"@regulaforensics/document-reader": "9.1.493-beta",
|
|
22
22
|
"@regulaforensics/document-reader-core-fullauthrfid": "8.4.787",
|
|
23
23
|
"@regulaforensics/document-reader-btdevice": "8.4.31",
|
|
24
24
|
"cordova-android": "^14.0.1",
|
|
@@ -20,7 +20,9 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
|
|
|
20
20
|
'A0000002480100',
|
|
21
21
|
'A0000002480200',
|
|
22
22
|
'A0000002480300',
|
|
23
|
-
'
|
|
23
|
+
'A0000002480400',
|
|
24
|
+
'A00000045645444C2D3031',
|
|
25
|
+
'D2760000850101',
|
|
24
26
|
]
|
|
25
27
|
},
|
|
26
28
|
entitlements: { 'com.apple.developer.nfc.readersession.formats': ['TAG'] },
|
|
@@ -6596,9 +6596,9 @@
|
|
|
6596
6596
|
"license": "MIT"
|
|
6597
6597
|
},
|
|
6598
6598
|
"node_modules/node-forge": {
|
|
6599
|
-
"version": "1.3.
|
|
6600
|
-
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.
|
|
6601
|
-
"integrity": "sha512-
|
|
6599
|
+
"version": "1.3.2",
|
|
6600
|
+
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.2.tgz",
|
|
6601
|
+
"integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==",
|
|
6602
6602
|
"license": "(BSD-3-Clause OR GPL-2.0)",
|
|
6603
6603
|
"engines": {
|
|
6604
6604
|
"node": ">= 6.13.0"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"start": "expo start"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@regulaforensics/document-reader": "9.1.
|
|
11
|
+
"@regulaforensics/document-reader": "9.1.493-beta",
|
|
12
12
|
"@regulaforensics/document-reader-core-fullauthrfid": "8.4.787",
|
|
13
13
|
"@regulaforensics/document-reader-btdevice": "8.4.31",
|
|
14
14
|
"react-native": "^0.81.4",
|
package/ios/RGLWConfig.m
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
functionality.singleResult = [[options valueForKey:@"singleResult"] boolValue];
|
|
36
36
|
if(options[@"torchTurnedOn"]) functionality.torchTurnedOn = [options[@"torchTurnedOn"] boolValue];
|
|
37
37
|
if(options[@"preventScreenRecording"]) functionality.preventScreenRecording = [options[@"preventScreenRecording"] boolValue];
|
|
38
|
+
if(options[@"homeIndicatorAutoHide"]) functionality.homeIndicatorAutoHide = [options[@"homeIndicatorAutoHide"] boolValue];
|
|
38
39
|
|
|
39
40
|
// Int
|
|
40
41
|
if([options valueForKey:@"showCaptureButtonDelayFromDetect"] != nil)
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
// Float
|
|
62
63
|
if([options valueForKey:@"zoomFactor"] != nil)
|
|
63
64
|
functionality.zoomFactor = [[options valueForKey:@"zoomFactor"] floatValue];
|
|
65
|
+
if(options[@"mdlTimeout"]) functionality.mDLTimeout = [options[@"mdlTimeout"] doubleValue];
|
|
64
66
|
|
|
65
67
|
// Custom
|
|
66
68
|
// in android - cameraSize
|
|
@@ -90,6 +92,7 @@
|
|
|
90
92
|
result[@"singleResult"] = [NSNumber numberWithBool:functionality.singleResult];
|
|
91
93
|
result[@"torchTurnedOn"] = @(functionality.torchTurnedOn);
|
|
92
94
|
result[@"preventScreenRecording"] = @(functionality.preventScreenRecording);
|
|
95
|
+
result[@"homeIndicatorAutoHide"] = @(functionality.homeIndicatorAutoHide);
|
|
93
96
|
|
|
94
97
|
// Int
|
|
95
98
|
result[@"showCaptureButtonDelayFromDetect"] = [NSNumber numberWithDouble:functionality.showCaptureButtonDelayFromDetect];
|
|
@@ -107,6 +110,7 @@
|
|
|
107
110
|
|
|
108
111
|
// Float
|
|
109
112
|
result[@"zoomFactor"] = [NSNumber numberWithFloat:functionality.zoomFactor];
|
|
113
|
+
result[@"mdlTimeout"] = @(functionality.mDLTimeout);
|
|
110
114
|
|
|
111
115
|
// Custom
|
|
112
116
|
// in android - cameraSize
|
|
@@ -256,8 +260,8 @@
|
|
|
256
260
|
processParams.documentGroupFilter = [options mutableArrayValueForKey:@"documentGroupFilter"];
|
|
257
261
|
if([options valueForKey:@"lcidIgnoreFilter"] != nil)
|
|
258
262
|
processParams.lcidIgnoreFilter = [options mutableArrayValueForKey:@"lcidIgnoreFilter"];
|
|
259
|
-
if([
|
|
260
|
-
|
|
263
|
+
if (options[@"lcidFilter"]) processParams.lcidFilter = options[@"lcidFilter"];
|
|
264
|
+
if (options[@"fieldTypesIgnoreFilter"]) processParams.fieldTypesIgnoreFilter = options[@"fieldTypesIgnoreFilter"];
|
|
261
265
|
|
|
262
266
|
// JSONObject
|
|
263
267
|
if (options[@"customParams"]) processParams.customParams = options[@"customParams"];
|
|
@@ -357,6 +361,7 @@
|
|
|
357
361
|
result[@"documentGroupFilter"] = processParams.documentGroupFilter;
|
|
358
362
|
result[@"lcidIgnoreFilter"] = processParams.lcidIgnoreFilter;
|
|
359
363
|
result[@"lcidFilter"] = processParams.lcidFilter;
|
|
364
|
+
result[@"fieldTypesIgnoreFilter"] = processParams.fieldTypesIgnoreFilter;
|
|
360
365
|
result[@"mrzFormatsFilter"] = processParams.mrzFormatsFilter;
|
|
361
366
|
result[@"resultTypeOutput"] = processParams.resultTypeOutput;
|
|
362
367
|
|
|
@@ -454,6 +459,7 @@
|
|
|
454
459
|
if(options[@"activityIndicatorPortraitPositionMultiplier"]) customization.activityIndicatorPortraitPositionMultiplier = [options[@"activityIndicatorPortraitPositionMultiplier"] floatValue];
|
|
455
460
|
if(options[@"activityIndicatorLandscapePositionMultiplier"]) customization.activityIndicatorLandscapePositionMultiplier = [options[@"activityIndicatorLandscapePositionMultiplier"] floatValue];
|
|
456
461
|
if(options[@"cameraPreviewVerticalPositionMultiplier"]) customization.previewLayerPositionMultiplier = [options[@"cameraPreviewVerticalPositionMultiplier"] floatValue];
|
|
462
|
+
if(options[@"multipageButtonPositionMultiplier"]) customization.multipageButtonPositionMultiplier = [options[@"multipageButtonPositionMultiplier"] floatValue];
|
|
457
463
|
|
|
458
464
|
// Drawable
|
|
459
465
|
if([options valueForKey:@"multipageAnimationFrontImage"] != nil)
|
|
@@ -568,6 +574,7 @@
|
|
|
568
574
|
result[@"activityIndicatorPortraitPositionMultiplier"] = [NSNumber numberWithFloat:customization.activityIndicatorPortraitPositionMultiplier];
|
|
569
575
|
result[@"activityIndicatorLandscapePositionMultiplier"] = [NSNumber numberWithFloat:customization.activityIndicatorLandscapePositionMultiplier];
|
|
570
576
|
result[@"cameraPreviewVerticalPositionMultiplier"] = [NSNumber numberWithFloat:customization.previewLayerPositionMultiplier];
|
|
577
|
+
result[@"multipageButtonPositionMultiplier"] = [NSNumber numberWithFloat:customization.multipageButtonPositionMultiplier];
|
|
571
578
|
|
|
572
579
|
// Drawable
|
|
573
580
|
result[@"multipageAnimationFrontImage"] = [RGLWJSONConstructor base64WithImage:customization.multipageAnimationFrontImage];
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
+(NSString* _Nullable)generateCompletion:(NSNumber*_Nonnull)action :(RGLDocumentReaderResults*_Nullable)results :(NSError*_Nullable)error;
|
|
21
21
|
+(NSString* _Nonnull)generatePACertificateCompletion:(NSData *_Nullable)serialNumber :(RGLPAResourcesIssuer *_Nullable)issuer;
|
|
22
22
|
+(NSString* _Nullable)generateFinalizePackageCompletion:(NSNumber*_Nonnull)action :(RGLTransactionInfo*_Nullable)info :(NSError*_Nullable)error;
|
|
23
|
+
+(NSString* _Nullable)generateDeviceEngagementCompletion:(RGLDeviceEngagement* _Nullable)deviceEngagement :(NSError* _Nullable)error;
|
|
23
24
|
|
|
24
25
|
+(RGLConfig* _Nullable)configFromJson:(NSDictionary* _Nullable)input;
|
|
25
26
|
+(NSDictionary* _Nullable)generateConfig:(RGLConfig* _Nullable)input;
|
|
@@ -126,6 +127,10 @@
|
|
|
126
127
|
+(NSDictionary* _Nullable)generateBytesData:(RGLBytesData* _Nullable)input;
|
|
127
128
|
+(RGLVDSNCData* _Nullable)vdsncDataFromJson:(NSDictionary* _Nullable)input;
|
|
128
129
|
+(NSDictionary* _Nullable)generateVDSNCData:(RGLVDSNCData* _Nullable)input;
|
|
130
|
+
+(RGLDocFeature* _Nullable)docFeatureFromJson:(NSDictionary* _Nullable)input;
|
|
131
|
+
+(NSDictionary* _Nullable)generateDocFeature:(RGLDocFeature* _Nullable)input;
|
|
132
|
+
+(RGLVDSData* _Nullable)vdsDataFromJson:(NSDictionary* _Nullable)input;
|
|
133
|
+
+(NSDictionary* _Nullable)generateVDSData:(RGLVDSData* _Nullable)input;
|
|
129
134
|
+(RGLOpticalStatus* _Nullable)opticalStatusFromJson:(NSDictionary* _Nullable)input;
|
|
130
135
|
+(NSDictionary* _Nullable)generateOpticalStatus:(RGLOpticalStatus* _Nullable)input;
|
|
131
136
|
+(RGLRFIDSessionDataStatus* _Nullable)rfidSessionDataStatusFromJson:(NSDictionary* _Nullable)input;
|
|
@@ -175,6 +180,20 @@
|
|
|
175
180
|
+(NSDictionary* _Nullable)generateTCCParams:(RGLTCCParams* _Nullable)input;
|
|
176
181
|
+(RGLTransactionInfo* _Nullable)transactionInfoFromJson:(NSDictionary* _Nullable)input;
|
|
177
182
|
+(NSDictionary* _Nullable)generateTransactionInfo:(RGLTransactionInfo* _Nullable)input;
|
|
183
|
+
+(RGLDetailsAge* _Nullable)detailsAgeFromJson:(NSDictionary* _Nullable)input;
|
|
184
|
+
+(NSDictionary* _Nullable)generateDetailsAge:(RGLDetailsAge* _Nullable)input;
|
|
185
|
+
+(RGLDeviceRetrievalMethod* _Nullable)deviceRetrievalMethodFromJson:(NSDictionary* _Nullable)input;
|
|
186
|
+
+(NSDictionary* _Nullable)generateDeviceRetrievalMethod:(RGLDeviceRetrievalMethod* _Nullable)input;
|
|
187
|
+
+(RGLDocumentRequest18013MDL* _Nullable)documentRequest18013MDLFromJson:(NSDictionary* _Nullable)input;
|
|
188
|
+
+(NSDictionary* _Nullable)generateDocumentRequest18013MDL:(RGLDocumentRequest18013MDL* _Nullable)input;
|
|
189
|
+
+(RGLDataRetrieval* _Nullable)dataRetrievalFromJson:(NSDictionary* _Nullable)input;
|
|
190
|
+
+(NSDictionary* _Nullable)generateDataRetrieval:(RGLDataRetrieval* _Nullable)input;
|
|
191
|
+
+(RGLDeviceEngagement* _Nullable)deviceEngagementFromJson:(NSDictionary* _Nullable)input;
|
|
192
|
+
+(NSDictionary* _Nullable)generateDeviceEngagement:(RGLDeviceEngagement* _Nullable)input;
|
|
193
|
+
+(RGLNameSpaceMDL* _Nullable)nameSpaceMDLFromJson:(NSDictionary* _Nullable)input;
|
|
194
|
+
+(NSDictionary* _Nullable)generateNameSpaceMDL:(RGLNameSpaceMDL* _Nullable)input;
|
|
195
|
+
+(RGLDocumentRequestMDL* _Nullable)documentRequestMDLFromJson:(NSDictionary* _Nullable)input;
|
|
196
|
+
+(NSDictionary* _Nullable)generateDocumentRequestMDL:(RGLDocumentRequestMDL* _Nullable)input;
|
|
178
197
|
|
|
179
198
|
@end
|
|
180
199
|
|
|
@@ -1959,6 +1959,9 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
1959
1959
|
result[@"detailsRFID"] = [self generateRFIDSessionDataStatus:input.detailsRFID];
|
|
1960
1960
|
result[@"portrait"] = @(input.portrait);
|
|
1961
1961
|
result[@"stopList"] = @(input.stopList);
|
|
1962
|
+
result[@"mDL"] = @(input.mDL);
|
|
1963
|
+
result[@"age"] = @(input.age);
|
|
1964
|
+
result[@"detailsAge"] = [self generateDetailsAge:input.detailsAge];
|
|
1962
1965
|
|
|
1963
1966
|
return result;
|
|
1964
1967
|
}
|
|
@@ -2017,6 +2020,24 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2017
2020
|
return result;
|
|
2018
2021
|
}
|
|
2019
2022
|
|
|
2023
|
+
+(RGLDetailsAge*)detailsAgeFromJson:(NSDictionary*)input {
|
|
2024
|
+
return [RGLDetailsAge performSelector:NSSelectorFromString(@"detailsAgeWithJSON:") withObject:input];
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
+(NSDictionary*)generateDetailsAge:(RGLDetailsAge*)input {
|
|
2028
|
+
if(input == nil) return nil;
|
|
2029
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2030
|
+
|
|
2031
|
+
result[@"threshold"] = input.threshold;
|
|
2032
|
+
result[@"overThreshold"] = @(input.overThreshold);
|
|
2033
|
+
result[@"over18"] = @(input.over18);
|
|
2034
|
+
result[@"over21"] = @(input.over21);
|
|
2035
|
+
result[@"over25"] = @(input.over25);
|
|
2036
|
+
result[@"over65"] = @(input.over65);
|
|
2037
|
+
|
|
2038
|
+
return result;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2020
2041
|
+(NSDictionary*)vdsncDataDictionaryFromJson:(NSDictionary*)input {
|
|
2021
2042
|
NSMutableDictionary* json = [NSMutableDictionary new];
|
|
2022
2043
|
|
|
@@ -2249,6 +2270,332 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2249
2270
|
return result;
|
|
2250
2271
|
}
|
|
2251
2272
|
|
|
2273
|
+
+(RGLDocFeature*)docFeatureFromJson:(NSDictionary*)input {
|
|
2274
|
+
NSMutableDictionary* json = input.mutableCopy;
|
|
2275
|
+
json[@"Type"] = input[@"type"];
|
|
2276
|
+
json[@"Data"] = [self bytesDataDictionaryFromJson: input[@"data"]];
|
|
2277
|
+
return [RGLDocFeature initWithJSON: json];
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
+(NSDictionary*)generateDocFeature:(RGLDocFeature*)input {
|
|
2281
|
+
if(input == nil) return nil;
|
|
2282
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2283
|
+
|
|
2284
|
+
result[@"type"] = input.type;
|
|
2285
|
+
result[@"data"] = [self generateBytesData:input.data];
|
|
2286
|
+
|
|
2287
|
+
return result;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
+(RGLVDSData*)vdsDataFromJson:(NSDictionary*)input {
|
|
2291
|
+
NSMutableArray<RGLCertificateChain*>* certificateChain = [NSMutableArray new];
|
|
2292
|
+
for(NSDictionary* item in [input valueForKey:@"certificateChain"]){
|
|
2293
|
+
[certificateChain addObject:[self certificateChainFromJson:item]];
|
|
2294
|
+
}
|
|
2295
|
+
NSMutableArray<RGLDocFeature*>* docFeatures = [NSMutableArray new];
|
|
2296
|
+
for(NSDictionary* item in [input valueForKey:@"docFeatures"]){
|
|
2297
|
+
[docFeatures addObject:[self docFeatureFromJson:item]];
|
|
2298
|
+
}
|
|
2299
|
+
NSMutableArray<NSNumber*>* notifications = [NSMutableArray new];
|
|
2300
|
+
for(NSNumber* item in [input valueForKey:@"notifications"]){
|
|
2301
|
+
[notifications addObject:item];
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
RGLVDSData* result = [RGLVDSData alloc];
|
|
2305
|
+
SEL sel = NSSelectorFromString(@"initWithType:docType:featureRef:version:certificate:issuingCountry:docIssueDate:signature:signatureDate:signer:certificateChain:docFeatures:notifications:");
|
|
2306
|
+
IMP imp = [result methodForSelector:sel];
|
|
2307
|
+
void (*func)(id, SEL, NSInteger, NSInteger, NSInteger, NSInteger, id, id, id, id, id, id, id, id, id) = (void *)imp;
|
|
2308
|
+
func(result,
|
|
2309
|
+
sel,
|
|
2310
|
+
[input[@"type"] integerValue],
|
|
2311
|
+
[input[@"docType"] integerValue],
|
|
2312
|
+
[input[@"featureRef"] integerValue],
|
|
2313
|
+
[input[@"version"] integerValue],
|
|
2314
|
+
input[@"certificate"],
|
|
2315
|
+
input[@"issuingCountry"],
|
|
2316
|
+
input[@"docIssueDate"],
|
|
2317
|
+
[self bytesDataFromJson:input[@"signature"]],
|
|
2318
|
+
input[@"signatureDate"],
|
|
2319
|
+
input[@"signer"],
|
|
2320
|
+
certificateChain,
|
|
2321
|
+
docFeatures,
|
|
2322
|
+
notifications);
|
|
2323
|
+
return result;
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
+(NSDictionary*)generateVDSData:(RGLVDSData*)input {
|
|
2327
|
+
if(input == nil) return nil;
|
|
2328
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2329
|
+
|
|
2330
|
+
result[@"type"] = @(input.type);
|
|
2331
|
+
result[@"docType"] = @(input.docType);
|
|
2332
|
+
result[@"featureRef"] = @(input.featureRef);
|
|
2333
|
+
result[@"version"] = @(input.version);
|
|
2334
|
+
result[@"certificate"] = input.certificate;
|
|
2335
|
+
result[@"issuingCountry"] = input.issuingCountry;
|
|
2336
|
+
result[@"docIssueDate"] = input.docIssueDate;
|
|
2337
|
+
result[@"signature"] = [self generateBytesData:input.signature];
|
|
2338
|
+
result[@"signatureDate"] = input.signatureDate;
|
|
2339
|
+
result[@"signer"] = input.signer;
|
|
2340
|
+
if(input.certificateChain != nil){
|
|
2341
|
+
NSMutableArray *array = [NSMutableArray new];
|
|
2342
|
+
for(RGLCertificateChain* item in input.certificateChain)
|
|
2343
|
+
[array addObject:[self generateCertificateChain:item]];
|
|
2344
|
+
result[@"certificateChain"] = array;
|
|
2345
|
+
}
|
|
2346
|
+
if(input.docFeatures != nil){
|
|
2347
|
+
NSMutableArray *array = [NSMutableArray new];
|
|
2348
|
+
for(RGLDocFeature* item in input.docFeatures)
|
|
2349
|
+
[array addObject:[self generateDocFeature:item]];
|
|
2350
|
+
result[@"docFeatures"] = array;
|
|
2351
|
+
}
|
|
2352
|
+
if(input.notifications != nil){
|
|
2353
|
+
NSMutableArray *array = [NSMutableArray new];
|
|
2354
|
+
for(NSNumber* item in input.notifications)
|
|
2355
|
+
[array addObject:item];
|
|
2356
|
+
result[@"notifications"] = array;
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
return result;
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
+(RGLDeviceRetrievalMethod*)deviceRetrievalMethodFromJson:(NSDictionary*)input {
|
|
2363
|
+
return [[RGLDeviceRetrievalMethod alloc] initWithJSON:input];
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
+(NSDictionary*)generateDeviceRetrievalMethod:(RGLDeviceRetrievalMethod*)input {
|
|
2367
|
+
if(input == nil) return nil;
|
|
2368
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2369
|
+
|
|
2370
|
+
result[@"type"] = @(input.type);
|
|
2371
|
+
result[@"version"] = input.version;
|
|
2372
|
+
result[@"cmdMaxLength"] = input.cmdMaxLength;
|
|
2373
|
+
result[@"respMaxLength"] = input.respMaxLength;
|
|
2374
|
+
result[@"clientModeSupport"] = input.clientModeSupport;
|
|
2375
|
+
result[@"clientModeUUID"] = input.clientModeUUID;
|
|
2376
|
+
result[@"serverModeSupport"] = input.serverModeSupport;
|
|
2377
|
+
result[@"serverModeUUID"] = input.serverModeUUID;
|
|
2378
|
+
|
|
2379
|
+
return result;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
+(RGLDeviceEngagement*)deviceEngagementFromJson:(NSDictionary*)input {
|
|
2383
|
+
RGLDeviceEngagement* result = [RGLDeviceEngagement new];
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
NSMutableArray<RGLDeviceRetrievalMethod*>* deviceRetrievalMethods = [NSMutableArray new];
|
|
2387
|
+
for(NSDictionary* item in [input valueForKey:@"deviceRetrievalMethods"]){
|
|
2388
|
+
[deviceRetrievalMethods addObject:[self deviceRetrievalMethodFromJson: item]];
|
|
2389
|
+
}
|
|
2390
|
+
result.deviceRetrievalMethods = deviceRetrievalMethods;
|
|
2391
|
+
|
|
2392
|
+
return result;
|
|
2393
|
+
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
+(NSDictionary*)generateDeviceEngagement:(RGLDeviceEngagement*)input {
|
|
2397
|
+
if(input == nil) return nil;
|
|
2398
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2399
|
+
|
|
2400
|
+
NSMutableArray *array = [NSMutableArray new];
|
|
2401
|
+
for(RGLDeviceRetrievalMethod* item in input.deviceRetrievalMethods)
|
|
2402
|
+
[array addObject:[self generateDeviceRetrievalMethod:item]];
|
|
2403
|
+
result[@"deviceRetrievalMethods"] = array;
|
|
2404
|
+
|
|
2405
|
+
return result;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
+(RGLNameSpaceMDL*)nameSpaceMDLFromJson:(NSDictionary*)input {
|
|
2409
|
+
RGLNameSpaceMDL* result = [[RGLNameSpaceMDL alloc] initWithName:input[@"name"]];
|
|
2410
|
+
|
|
2411
|
+
[result setValue:input[@"map"] forKey:@"jsonDict"];
|
|
2412
|
+
|
|
2413
|
+
return result;
|
|
2414
|
+
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
+(NSDictionary*)generateNameSpaceMDL:(RGLNameSpaceMDL*)input {
|
|
2418
|
+
if(input == nil) return nil;
|
|
2419
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2420
|
+
|
|
2421
|
+
result[@"name"] = input.name;
|
|
2422
|
+
result[@"map"] = [input valueForKey:@"jsonDict"];
|
|
2423
|
+
|
|
2424
|
+
return result;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
+(RGLDocumentRequestMDL*)documentRequestMDLFromJson:(NSDictionary*)input {
|
|
2428
|
+
NSString* docType = input[@"docType"];
|
|
2429
|
+
if([docType isEqual: @"org.iso.18013.5.1.mDL"]) return [self documentRequest18013MDLFromJson: input];
|
|
2430
|
+
RGLDocumentRequestMDL* result = [[RGLDocumentRequestMDL alloc] initWithDocType:docType];
|
|
2431
|
+
|
|
2432
|
+
NSMutableArray<RGLNameSpaceMDL*>* nameSpaces = [NSMutableArray new];
|
|
2433
|
+
for(NSDictionary* item in [input valueForKey:@"namespaces"]){
|
|
2434
|
+
[nameSpaces addObject:[self nameSpaceMDLFromJson: item]];
|
|
2435
|
+
}
|
|
2436
|
+
[result setValue:nameSpaces forKey:@"nameSpaces"];
|
|
2437
|
+
|
|
2438
|
+
return result;
|
|
2439
|
+
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
+(NSDictionary*)generateDocumentRequestMDL:(RGLDocumentRequestMDL*)input {
|
|
2443
|
+
if(input == nil) return nil;
|
|
2444
|
+
NSString* docType = [input valueForKey:@"docType"];
|
|
2445
|
+
if([docType isEqual: @"org.iso.18013.5.1.mDL"]) return [self generateDocumentRequest18013MDL: (RGLDocumentRequest18013MDL*)input];
|
|
2446
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2447
|
+
|
|
2448
|
+
NSMutableArray *array = [NSMutableArray new];
|
|
2449
|
+
for(RGLNameSpaceMDL* item in [input valueForKey:@"nameSpaces"])
|
|
2450
|
+
[array addObject:[self generateNameSpaceMDL:item]];
|
|
2451
|
+
|
|
2452
|
+
result[@"docType"] = docType;
|
|
2453
|
+
result[@"namespaces"] = array;
|
|
2454
|
+
|
|
2455
|
+
return result;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
+(RGLDocumentRequest18013MDL*)documentRequest18013MDLFromJson:(NSDictionary*)input {
|
|
2459
|
+
if(input == nil) return nil;
|
|
2460
|
+
RGLDocumentRequest18013MDL* result = [RGLDocumentRequest18013MDL new];
|
|
2461
|
+
|
|
2462
|
+
[result setValue:[input valueForKey:@"docType"] forKey:@"docType"];
|
|
2463
|
+
NSMutableArray<RGLNameSpaceMDL*>* nameSpaces = [NSMutableArray new];
|
|
2464
|
+
for(NSDictionary* item in [input valueForKey:@"namespaces"]){
|
|
2465
|
+
[nameSpaces addObject:[self nameSpaceMDLFromJson: item]];
|
|
2466
|
+
}
|
|
2467
|
+
[result setValue:nameSpaces forKey:@"nameSpaces"];
|
|
2468
|
+
if (input[@"familyName"]) result.familyName = [input[@"familyName"] integerValue];
|
|
2469
|
+
if (input[@"givenName"]) result.givenName = [input[@"givenName"] integerValue];
|
|
2470
|
+
if (input[@"birthDate"]) result.birthDate = [input[@"birthDate"] integerValue];
|
|
2471
|
+
if (input[@"issueDate"]) result.issueDate = [input[@"issueDate"] integerValue];
|
|
2472
|
+
if (input[@"expiryDate"]) result.expiryDate = [input[@"expiryDate"] integerValue];
|
|
2473
|
+
if (input[@"issuingCountry"]) result.issuingCountry = [input[@"issuingCountry"] integerValue];
|
|
2474
|
+
if (input[@"issuingAuthority"]) result.issuingAuthority = [input[@"issuingAuthority"] integerValue];
|
|
2475
|
+
if (input[@"documentNumber"]) result.documentNumber = [input[@"documentNumber"] integerValue];
|
|
2476
|
+
if (input[@"portrait"]) result.portrait = [input[@"portrait"] integerValue];
|
|
2477
|
+
if (input[@"drivingPrivileges"]) result.drivingPrivileges = [input[@"drivingPrivileges"] integerValue];
|
|
2478
|
+
if (input[@"unDistinguishingSign"]) result.unDistinguishingSign = [input[@"unDistinguishingSign"] integerValue];
|
|
2479
|
+
if (input[@"administrativeNumber"]) result.administrativeNumber = [input[@"administrativeNumber"] integerValue];
|
|
2480
|
+
if (input[@"sex"]) result.sex = [input[@"sex"] integerValue];
|
|
2481
|
+
if (input[@"height"]) result.height = [input[@"height"] integerValue];
|
|
2482
|
+
if (input[@"weight"]) result.weight = [input[@"weight"] integerValue];
|
|
2483
|
+
if (input[@"eyeColour"]) result.eyeColour = [input[@"eyeColour"] integerValue];
|
|
2484
|
+
if (input[@"hairColour"]) result.hairColour = [input[@"hairColour"] integerValue];
|
|
2485
|
+
if (input[@"birthPlace"]) result.birthPlace = [input[@"birthPlace"] integerValue];
|
|
2486
|
+
if (input[@"residentAddress"]) result.residentAddress = [input[@"residentAddress"] integerValue];
|
|
2487
|
+
if (input[@"portraitCaptureDate"]) result.portraitCaptureDate = [input[@"portraitCaptureDate"] integerValue];
|
|
2488
|
+
if (input[@"ageInYears"]) result.ageInYears = [input[@"ageInYears"] integerValue];
|
|
2489
|
+
if (input[@"ageBirthYear"]) result.ageBirthYear = [input[@"ageBirthYear"] integerValue];
|
|
2490
|
+
if (input[@"ageOver18"]) result.ageOver18 = [input[@"ageOver18"] integerValue];
|
|
2491
|
+
if (input[@"issuingJurisdiction"]) result.issuingJurisdiction = [input[@"issuingJurisdiction"] integerValue];
|
|
2492
|
+
if (input[@"nationality"]) result.nationality = [input[@"nationality"] integerValue];
|
|
2493
|
+
if (input[@"residentCity"]) result.residentCity = [input[@"residentCity"] integerValue];
|
|
2494
|
+
if (input[@"residentState"]) result.residentState = [input[@"residentState"] integerValue];
|
|
2495
|
+
if (input[@"residentPostalCode"]) result.residentPostalCode = [input[@"residentPostalCode"] integerValue];
|
|
2496
|
+
if (input[@"residentCountry"]) result.residentCountry = [input[@"residentCountry"] integerValue];
|
|
2497
|
+
if (input[@"biometricTemplateFace"]) result.biometricTemplateFace = [input[@"biometricTemplateFace"] integerValue];
|
|
2498
|
+
if (input[@"biometricTemplateIris"]) result.biometricTemplateIris = [input[@"biometricTemplateIris"] integerValue];
|
|
2499
|
+
if (input[@"biometricTemplateFinger"]) result.biometricTemplateFinger = [input[@"biometricTemplateFinger"] integerValue];
|
|
2500
|
+
if (input[@"biometricTemplateSignatureSign"]) result.biometricTemplateSignatureSign = [input[@"biometricTemplateSignatureSign"] integerValue];
|
|
2501
|
+
if (input[@"familyNameNationalCharacter"]) result.familyNameNationalCharacter = [input[@"familyNameNationalCharacter"] integerValue];
|
|
2502
|
+
if (input[@"givenNameNationalCharacter"]) result.givenNameNationalCharacter = [input[@"givenNameNationalCharacter"] integerValue];
|
|
2503
|
+
if (input[@"signatureUsualMark"]) result.signatureUsualMark = [input[@"signatureUsualMark"] integerValue];
|
|
2504
|
+
|
|
2505
|
+
return result;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
+(NSDictionary*)generateDocumentRequest18013MDL:(RGLDocumentRequest18013MDL*)input {
|
|
2509
|
+
if(input == nil) return nil;
|
|
2510
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2511
|
+
|
|
2512
|
+
NSMutableArray *array = [NSMutableArray new];
|
|
2513
|
+
for(RGLNameSpaceMDL* item in [input valueForKey:@"nameSpaces"])
|
|
2514
|
+
[array addObject:[self generateNameSpaceMDL:item]];
|
|
2515
|
+
|
|
2516
|
+
result[@"docType"] = [input valueForKey:@"docType"];
|
|
2517
|
+
result[@"namespaces"] = array;
|
|
2518
|
+
if (input.familyName != -1) result[@"familyName"] = @(input.familyName);
|
|
2519
|
+
if (input.givenName != -1) result[@"givenName"] = @(input.givenName);
|
|
2520
|
+
if (input.birthDate != -1) result[@"birthDate"] = @(input.birthDate);
|
|
2521
|
+
if (input.issueDate != -1) result[@"issueDate"] = @(input.issueDate);
|
|
2522
|
+
if (input.expiryDate != -1) result[@"expiryDate"] = @(input.expiryDate);
|
|
2523
|
+
if (input.issuingCountry != -1) result[@"issuingCountry"] = @(input.issuingCountry);
|
|
2524
|
+
if (input.issuingAuthority != -1) result[@"issuingAuthority"] = @(input.issuingAuthority);
|
|
2525
|
+
if (input.documentNumber != -1) result[@"documentNumber"] = @(input.documentNumber);
|
|
2526
|
+
if (input.portrait != -1) result[@"portrait"] = @(input.portrait);
|
|
2527
|
+
if (input.drivingPrivileges != -1) result[@"drivingPrivileges"] = @(input.drivingPrivileges);
|
|
2528
|
+
if (input.unDistinguishingSign != -1) result[@"unDistinguishingSign"] = @(input.unDistinguishingSign);
|
|
2529
|
+
if (input.administrativeNumber != -1) result[@"administrativeNumber"] = @(input.administrativeNumber);
|
|
2530
|
+
if (input.sex != -1) result[@"sex"] = @(input.sex);
|
|
2531
|
+
if (input.height != -1) result[@"height"] = @(input.height);
|
|
2532
|
+
if (input.weight != -1) result[@"weight"] = @(input.weight);
|
|
2533
|
+
if (input.eyeColour != -1) result[@"eyeColour"] = @(input.eyeColour);
|
|
2534
|
+
if (input.hairColour != -1) result[@"hairColour"] = @(input.hairColour);
|
|
2535
|
+
if (input.birthPlace != -1) result[@"birthPlace"] = @(input.birthPlace);
|
|
2536
|
+
if (input.residentAddress != -1) result[@"residentAddress"] = @(input.residentAddress);
|
|
2537
|
+
if (input.portraitCaptureDate != -1) result[@"portraitCaptureDate"] = @(input.portraitCaptureDate);
|
|
2538
|
+
if (input.ageInYears != -1) result[@"ageInYears"] = @(input.ageInYears);
|
|
2539
|
+
if (input.ageBirthYear != -1) result[@"ageBirthYear"] = @(input.ageBirthYear);
|
|
2540
|
+
if (input.ageOver18 != -1) result[@"ageOver18"] = @(input.ageOver18);
|
|
2541
|
+
if (input.issuingJurisdiction != -1) result[@"issuingJurisdiction"] = @(input.issuingJurisdiction);
|
|
2542
|
+
if (input.nationality != -1) result[@"nationality"] = @(input.nationality);
|
|
2543
|
+
if (input.residentCity != -1) result[@"residentCity"] = @(input.residentCity);
|
|
2544
|
+
if (input.residentState != -1) result[@"residentState"] = @(input.residentState);
|
|
2545
|
+
if (input.residentPostalCode != -1) result[@"residentPostalCode"] = @(input.residentPostalCode);
|
|
2546
|
+
if (input.residentCountry != -1) result[@"residentCountry"] = @(input.residentCountry);
|
|
2547
|
+
if (input.biometricTemplateFace != -1) result[@"biometricTemplateFace"] = @(input.biometricTemplateFace);
|
|
2548
|
+
if (input.biometricTemplateIris != -1) result[@"biometricTemplateIris"] = @(input.biometricTemplateIris);
|
|
2549
|
+
if (input.biometricTemplateFinger != -1) result[@"biometricTemplateFinger"] = @(input.biometricTemplateFinger);
|
|
2550
|
+
if (input.biometricTemplateSignatureSign != -1) result[@"biometricTemplateSignatureSign"] = @(input.biometricTemplateSignatureSign);
|
|
2551
|
+
if (input.familyNameNationalCharacter != -1) result[@"familyNameNationalCharacter"] = @(input.familyNameNationalCharacter);
|
|
2552
|
+
if (input.givenNameNationalCharacter != -1) result[@"givenNameNationalCharacter"] = @(input.givenNameNationalCharacter);
|
|
2553
|
+
if (input.signatureUsualMark != -1) result[@"signatureUsualMark"] = @(input.signatureUsualMark);
|
|
2554
|
+
|
|
2555
|
+
return result;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
+(RGLDataRetrieval*)dataRetrievalFromJson:(NSDictionary*)input {
|
|
2559
|
+
RGLDataRetrieval* result = [[RGLDataRetrieval alloc] initWithDeviceRetrieval:[input[@"deviceRetrieval"] integerValue]];
|
|
2560
|
+
|
|
2561
|
+
[result setValue:input[@"docRequestPreset"] forKey:@"docRequestPreset"];
|
|
2562
|
+
[result setValue:input[@"intentToRetain"] forKey:@"intentToRetain"];
|
|
2563
|
+
|
|
2564
|
+
NSMutableArray<RGLDocumentRequestMDL*>* requests = [NSMutableArray new];
|
|
2565
|
+
for(NSDictionary* item in [input valueForKey:@"requests"]){
|
|
2566
|
+
[requests addObject:[self documentRequestMDLFromJson: item]];
|
|
2567
|
+
}
|
|
2568
|
+
result.requests = requests;
|
|
2569
|
+
|
|
2570
|
+
return result;
|
|
2571
|
+
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
+(NSDictionary*)generateDataRetrieval:(RGLDataRetrieval*)input {
|
|
2575
|
+
if(input == nil) return nil;
|
|
2576
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2577
|
+
|
|
2578
|
+
result[@"deviceRetrieval"] = [input valueForKey:@"deviceRetrieval"];
|
|
2579
|
+
result[@"docRequestPreset"] = [input valueForKey:@"docRequestPreset"];
|
|
2580
|
+
result[@"intentToRetain"] = [input valueForKey:@"intentToRetain"];
|
|
2581
|
+
|
|
2582
|
+
NSMutableArray *array = [NSMutableArray new];
|
|
2583
|
+
for(RGLDocumentRequestMDL* item in input.requests)
|
|
2584
|
+
[array addObject:[self generateDocumentRequestMDL:item]];
|
|
2585
|
+
result[@"requests"] = array;
|
|
2586
|
+
|
|
2587
|
+
return result;
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
+(NSString*)generateDeviceEngagementCompletion:(RGLDeviceEngagement*)deviceEngagement :(NSError*)error {
|
|
2591
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2592
|
+
|
|
2593
|
+
result[@"deviceEngagement"] = [self generateDeviceEngagement:deviceEngagement];
|
|
2594
|
+
result[@"error"] = [self generateError:error];
|
|
2595
|
+
|
|
2596
|
+
return [RGLWJSONConstructor dictToString: result];
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2252
2599
|
+(RGLDocumentReaderResults*)documentReaderResultsFromJson:(NSDictionary*)input {
|
|
2253
2600
|
NSMutableArray<RGLDocumentReaderDocumentType*>* documentType = [NSMutableArray new];
|
|
2254
2601
|
for(NSDictionary* item in [input valueForKey:@"documentType"]){
|
|
@@ -2285,6 +2632,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2285
2632
|
chipPage:[[input valueForKey:@"chipPage"] integerValue]
|
|
2286
2633
|
barcodeResult:[self documentReaderBarcodeResultFromJson: [input valueForKey:@"barcodeResult"]]
|
|
2287
2634
|
vdsncData:[self vdsncDataFromJson: [input valueForKey:@"vdsncData"]]
|
|
2635
|
+
vdsData:[self vdsDataFromJson: [input valueForKey:@"vdsData"]]
|
|
2288
2636
|
status:[self documentReaderResultsStatusFromJson: [input valueForKey:@"status"]]
|
|
2289
2637
|
processingFinished:[[input valueForKey:@"processingFinishedStatus"] integerValue]
|
|
2290
2638
|
morePagesAvailable:[[input valueForKey:@"morePagesAvailable"] integerValue]
|
|
@@ -2344,6 +2692,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2344
2692
|
result[@"rawResult"] = input.rawResult;
|
|
2345
2693
|
result[@"status"] = [self generateDocumentReaderResultsStatus:input.status];
|
|
2346
2694
|
result[@"vdsncData"] = [self generateVDSNCData:input.vdsncData];
|
|
2695
|
+
result[@"vdsData"] = [self generateVDSData:input.vdsData];
|
|
2347
2696
|
result[@"dtcData"] = [self base64Encode: input.dtcData];
|
|
2348
2697
|
result[@"transactionInfo"] = [self generateTransactionInfo:input.transactionInfo];
|
|
2349
2698
|
|
package/ios/RGLWMain.m
CHANGED
|
@@ -55,6 +55,13 @@
|
|
|
55
55
|
@"btDeviceRequestFlashing": ^{ /* android only */ },
|
|
56
56
|
@"btDeviceRequestFlashingFullIR": ^{ /* android only */ },
|
|
57
57
|
@"btDeviceRequestTurnOffAll": ^{ /* android only */ },
|
|
58
|
+
@"startReadMDl": ^{ [self startReadMDl :args[0] :args[1] :callback]; },
|
|
59
|
+
@"startEngageDevice": ^{ [self startEngageDevice :args[0] :callback]; },
|
|
60
|
+
@"engageDeviceNFC": ^{ [self engageDeviceNFC :callback]; },
|
|
61
|
+
@"engageDeviceData": ^{ [self engageDeviceData :args[0] :callback]; },
|
|
62
|
+
@"startRetrieveData": ^{ [self startRetrieveData :args[0] :args[1] :callback]; },
|
|
63
|
+
@"retrieveDataNFC": ^{ [self retrieveDataNFC :args[0] :callback]; },
|
|
64
|
+
@"retrieveDataBLE": ^{ [self retrieveDataBLE :args[0] :args[0] :callback]; },
|
|
58
65
|
@"setLocalizationDictionary": ^{ [self setLocalizationDictionary :args[0]]; },
|
|
59
66
|
@"getLicense": ^{ [self getLicense :callback]; },
|
|
60
67
|
@"getAvailableScenarios": ^{ [self getAvailableScenarios :callback]; },
|
|
@@ -357,6 +364,48 @@ RGLWCallback savedCallbackForBluetoothResult;
|
|
|
357
364
|
[bluetooth disconnect];
|
|
358
365
|
}
|
|
359
366
|
|
|
367
|
+
+(void)startReadMDl:(NSNumber*)type :(NSDictionary*)dataRetrieval :(RGLWCallback)callback {
|
|
368
|
+
[RGLDocReader.shared startReadMDLFromPresenter:RGLWRootViewController() engagementType:[type integerValue] dataRetrieval:[RGLWJSONConstructor dataRetrievalFromJson:dataRetrieval] completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
|
|
369
|
+
callback([RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
|
|
370
|
+
}];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
+(void)startEngageDevice:(NSNumber*)type :(RGLWCallback)callback {
|
|
374
|
+
[RGLDocReader.shared startEngageDeviceFromPresenter:RGLWRootViewController() type:[type integerValue] completion:^(RGLDeviceEngagement* deviceEngagement, NSError* error) {
|
|
375
|
+
callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
|
|
376
|
+
}];
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
+(void)engageDeviceNFC:(RGLWCallback)callback {
|
|
380
|
+
[RGLDocReader.shared engageDeviceNFC:RGLWRootViewController() completion:^(RGLDeviceEngagement * _Nullable deviceEngagement, NSError * _Nullable error) {
|
|
381
|
+
callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
|
|
382
|
+
}];
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
+(void)engageDeviceData:(NSString*)data :(RGLWCallback)callback {
|
|
386
|
+
[RGLDocReader.shared engageDeviceData:data completion:^(RGLDeviceEngagement * _Nullable deviceEngagement, NSError * _Nullable error) {
|
|
387
|
+
callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
|
|
388
|
+
}];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
+(void)startRetrieveData:(NSDictionary*)dataRetrieval :(NSDictionary*)deviceEngagement :(RGLWCallback)callback {
|
|
392
|
+
[RGLDocReader.shared startRetrieveData:[RGLWJSONConstructor deviceEngagementFromJson:deviceEngagement] dataRetrieval:[RGLWJSONConstructor dataRetrievalFromJson:dataRetrieval] completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
|
|
393
|
+
callback([RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
|
|
394
|
+
}];
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
+(void)retrieveDataNFC:(NSDictionary*)dataRetrieval :(RGLWCallback)callback {
|
|
398
|
+
[RGLDocReader.shared retrieveDataNFC:[RGLWJSONConstructor dataRetrievalFromJson:dataRetrieval] completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
|
|
399
|
+
callback([RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
|
|
400
|
+
}];
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
+(void)retrieveDataBLE:(NSDictionary*)dataRetrieval :(NSDictionary*)deviceEngagement :(RGLWCallback)callback {
|
|
404
|
+
[RGLDocReader.shared retrieveDataBLE:[RGLWJSONConstructor deviceEngagementFromJson:deviceEngagement] dataRetrieval:[RGLWJSONConstructor dataRetrievalFromJson:dataRetrieval] completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
|
|
405
|
+
callback([RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
|
|
406
|
+
}];
|
|
407
|
+
}
|
|
408
|
+
|
|
360
409
|
+(void)setLocalizationDictionary:(NSDictionary*)dictionary {
|
|
361
410
|
RGLDocReader.shared.localizationHandler = ^NSString * _Nullable(NSString * _Nonnull localizationKey) {
|
|
362
411
|
if(dictionary != nil && ![dictionary isEqual:[NSNull null]] && [dictionary valueForKey:localizationKey] != nil)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/document-reader",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.493-beta",
|
|
4
4
|
"description": "This is an npm module for Regula Document Reader SDK. It allows you to read various kinds of identification documents using your phone's camera.",
|
|
5
5
|
"main": "www/react-native/index.js",
|
|
6
6
|
"module": "www/capacitor/index.js",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/document-reader" version="9.1.
|
|
2
|
+
<plugin id="@regulaforensics/document-reader" version="9.1.493-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>DocumentReader</name>
|
|
4
4
|
<description>Cordova plugin for Regula Document Reader SDK</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<source url="https://github.com/CocoaPods/Specs.git" />
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="
|
|
32
|
+
<pod name="DocumentReaderBeta" spec="9.1.5681" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|