@regulaforensics/cordova-plugin-document-reader-api 9.11.953-rc → 9.11.955-rc

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.
@@ -1,6 +1,6 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
2
  <widget android-packageName="com.regula.dr.fullauthrfid" ios-CFBundleIdentifier="regula.DocumentReader" version="1.0.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
- <name>Document</name>
3
+ <name>DocumentReader</name>
4
4
  <platform name="android">
5
5
  <resource-file src="www/db.dat" target="app/src/main/assets/Regula/db.dat" />
6
6
  <preference name="orientation" value="portrait" />
@@ -15,7 +15,7 @@
15
15
  </platform>
16
16
  <platform name="ios">
17
17
  <resource-file src="www/db.dat" />
18
- <preference name="deployment-target" value="16.0" />
18
+ <preference name="deployment-target" value="15.0" />
19
19
  <preference name="orientation" value="portrait" />
20
20
  <allow-intent href="itms:*" />
21
21
  <allow-intent href="itms-apps:*" />
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "document",
3
- "displayName": "Document",
2
+ "name": "documentreader",
3
+ "displayName": "DocumentReader",
4
4
  "version": "1.0.0",
5
5
  "description": "A sample Regula Document Reader application for reading and validation of identification documents.",
6
6
  "main": "index.js",
@@ -13,8 +13,8 @@
13
13
  "author": "Regula Forensics Inc.",
14
14
  "license": "commercial",
15
15
  "dependencies": {
16
- "@regulaforensics/cordova-plugin-document-reader-api": "9.11.953-rc",
17
- "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.10.3958",
16
+ "@regulaforensics/cordova-plugin-document-reader-api": "9.11.955-rc",
17
+ "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.11.4081-rc",
18
18
  "cordova-android": "15.0.0",
19
19
  "cordova-ios": "8.1.1",
20
20
  "cordova-plugin-camera": "8.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/cordova-plugin-document-reader-api",
3
- "version": "9.11.953-rc",
3
+ "version": "9.11.955-rc",
4
4
  "description": "Cordova plugin for reading and validation of identification documents (API framework)",
5
5
  "cordova": {
6
6
  "id": "@regulaforensics/cordova-plugin-document-reader-api",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.11.953-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.11.955-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
3
3
  <name>DocumentReaderApi</name>
4
4
  <description>Cordova plugin Document reader api</description>
5
5
  <license>commercial</license>
@@ -15,19 +15,21 @@
15
15
  <param name="ios-package" value="RGLWDocumentReader" />
16
16
  </feature>
17
17
  <preference name="deployment-target" value="16.0" />
18
- <preference name="SwiftVersion" value="5" />
19
18
  </config-file>
20
- <source-file src="src/ios/RGLWDocumentReader.swift" />
21
- <source-file src="src/ios/Config.swift" />
22
- <source-file src="src/ios/Decoder.swift" />
23
- <source-file src="src/ios/Implementation.swift" />
24
- <source-file src="src/ios/Utils.swift" />
19
+ <header-file src="src/ios/RGLWDocumentReader.h" />
20
+ <source-file src="src/ios/RGLWDocumentReader.m" />
21
+ <header-file src="src/ios/RGLWJSONConstructor.h" />
22
+ <source-file src="src/ios/RGLWJSONConstructor.m" />
23
+ <header-file src="src/ios/RGLWConfig.h" />
24
+ <source-file src="src/ios/RGLWConfig.m" />
25
+ <header-file src="src/ios/RGLWMain.h" />
26
+ <source-file src="src/ios/RGLWMain.m" />
25
27
  <podspec>
26
28
  <config>
27
29
  <source url="https://github.com/regulaforensics/podspecs.git"/>
28
30
  </config>
29
31
  <pods>
30
- <pod name="DocumentReader" spec="9.10.7402" />
32
+ <pod name="DocumentReaderStage" spec="9.11.7419" />
31
33
  </pods>
32
34
  </podspec>
33
35
  </platform>
@@ -10,13 +10,10 @@ import org.apache.cordova.CallbackContext
10
10
  import org.apache.cordova.CordovaPlugin
11
11
  import org.apache.cordova.PluginResult
12
12
  import org.json.JSONArray
13
- import org.json.JSONObject
14
13
 
15
14
  val eventCallbackIds = mutableMapOf<String, String>()
16
15
  lateinit var callbackContext: CallbackContext
17
16
 
18
- // Args pass null arguments as nulls, null elements in arrays as nulls,
19
- // but in maps keys with null values are removed.
20
17
  lateinit var args: JSONArray
21
18
  lateinit var binding: CordovaPlugin
22
19
  val context: Context
@@ -48,25 +45,9 @@ fun sendEvent(event: String, data: Any? = "") {
48
45
  }
49
46
 
50
47
  @Suppress("UNCHECKED_CAST")
51
- fun <T> argsNullable(index: Int): T? {
52
- if (args.isNull(index)) return null
53
- val value = args.get(index)
54
- omitNullKeys(value)
55
- return value as T
56
- }
57
-
58
- private fun omitNullKeys(value: Any?) {
59
- when (value) {
60
- is JSONObject -> {
61
- val keys = value.keys()
62
- while (keys.hasNext()) {
63
- val key = keys.next()
64
- if (value.isNull(key)) keys.remove() else omitNullKeys(value.get(key))
65
- }
66
- }
67
- is JSONArray -> for (index in 0 until value.length()) omitNullKeys(value.opt(index))
68
- }
69
- }
48
+ fun <T> argsNullable(index: Int): T? = if (args.get(index).toString() != "null") {
49
+ args.get(index) as T
50
+ } else null
70
51
 
71
52
  fun requestPermissions(@Suppress("UNUSED_PARAMETER") activity: Activity, permissions: Array<String>, requestCode: Int) = binding.cordova.requestPermissions(binding, requestCode, permissions)
72
53
  fun startActivityForResult(@Suppress("UNUSED_PARAMETER") activity: Activity, intent: Intent, requestCode: Int) = binding.cordova.startActivityForResult(binding, intent, requestCode)
@@ -139,7 +139,7 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
139
139
  "finalizePackage" -> finalizePackage(callback)
140
140
  "finalizePackageWithFinalizeConfig" -> finalizePackageWithFinalizeConfig(callback, args(0))
141
141
  "endBackendTransaction" -> endBackendTransaction()
142
- "getTranslation" -> getTranslation(callback, args(0), (args[1] as Number).toLong().toInt())
142
+ "getTranslation" -> getTranslation(callback, args(0), args(1))
143
143
  else -> Unit
144
144
  }
145
145
 
@@ -510,7 +510,7 @@ fun encryptedContainers(
510
510
  raw: String
511
511
  ) = callback(fromRawResults(raw).encryptedContainers)
512
512
 
513
- fun getTranslation(callback: Callback, className: String, value: Int) = if (value == -1) callback("Unknown") else when (className) {
513
+ fun getTranslation(callback: Callback, className: String, value: Int) = when (className) {
514
514
  "RFIDErrorCodes" -> callback(eRFID_ErrorCodes.getTranslation(context, value))
515
515
  "LDSParsingErrorCodes" -> callback(eLDS_ParsingErrorCodes.getTranslation(context, value))
516
516
  "LDSParsingNotificationCodes" -> callback(eLDS_ParsingNotificationCodes.getTranslation(context, value))
@@ -7,7 +7,7 @@ repositories {
7
7
 
8
8
  dependencies {
9
9
  //noinspection GradleDependency
10
- implementation ('com.regula.documentreader:api:9.10.13800'){
10
+ implementation ('com.regula.documentreader:api:9.11.13836'){
11
11
  transitive = true
12
12
  }
13
13
  }
@@ -0,0 +1,44 @@
1
+ #ifndef RGLWConfig_h
2
+ #define RGLWConfig_h
3
+
4
+ #import <DocumentReader/DocumentReader.h>
5
+ #import "RGLWJSONConstructor.h"
6
+
7
+ @import CoreGraphics;
8
+ @import UIKit;
9
+ @import AVFoundation;
10
+
11
+ @interface RGLWConfig : NSObject
12
+
13
+ +(void)setFunctionality:(NSDictionary*)options :(RGLFunctionality*)functionality;
14
+ +(void)setProcessParams:(NSDictionary*)options :(RGLProcessParams*)processParams;
15
+ +(void)setCustomization:(NSDictionary*)options :(RGLCustomization*)customization;
16
+ +(void)setRfidScenario:(NSDictionary*)options :(RGLRFIDScenario*)rfidScenario;
17
+ +(void)setDataGroups:(RGLDataGroup*)dataGroup dict:(NSDictionary*)dict;
18
+ +(void)setDTCDataGroup:(RGLDTCDataGroup*)dataGroup dict:(NSDictionary*)dict;
19
+ +(void)setImageQA:(RGLImageQA*)result input:(NSDictionary*)input;
20
+ +(void)setAuthenticityParams:(RGLAuthenticityParams*)result input:(NSDictionary*)input;
21
+ +(void)setLivenessParams:(RGLLivenessParams*)result input:(NSDictionary*)input;
22
+ +(void)setAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)result input:(NSDictionary*)input;
23
+
24
+ +(NSDictionary*)getFunctionality:(RGLFunctionality*)functionality;
25
+ +(NSDictionary*)getProcessParams:(RGLProcessParams*)processParams;
26
+ +(NSDictionary*)getCustomization:(RGLCustomization*)customization;
27
+ +(NSDictionary*)getRfidScenario:(RGLRFIDScenario*)rfidScenario;
28
+ +(NSDictionary*)getDataGroups:(RGLDataGroup*)dataGroup;
29
+ +(NSDictionary*)getDTCDataGroup:(RGLDTCDataGroup*)dataGroup;
30
+ +(NSDictionary*)getImageQA:(RGLImageQA*)input;
31
+ +(NSDictionary*)getAuthenticityParams:(RGLAuthenticityParams*)input;
32
+ +(NSDictionary*)getLivenessParams:(RGLLivenessParams*)input;
33
+ +(NSDictionary*)getAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)input;
34
+
35
+ +(RGLImageQualityCheckType)imageQualityCheckTypeWithNumber:(NSNumber*)value;
36
+ +(NSNumber*)generateDocReaderAction:(RGLDocReaderAction)action;
37
+ +(NSNumber*)generateRFIDCompleteAction:(RGLRFIDCompleteAction)action;
38
+ +(NSNumber*)generateImageQualityCheckType:(RGLImageQualityCheckType)value;
39
+
40
+ +(RGLDocReaderFrame)docReaderFrameWithString:(NSString*)value;
41
+ +(NSString*)generateDocReaderFrame:(RGLDocReaderFrame)value;
42
+
43
+ @end
44
+ #endif