@thegrizzlylabs/react-native-genius-scan 5.17.3 → 6.0.0-beta02
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 +4 -4
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/geniusscansdk/reactnative/RNGeniusScanModule.java +12 -10
- package/index.d.ts +7 -7
- package/index.js +1 -1
- package/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Assets.car +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/DeviceList.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/PrivacyInfo.xcprivacy +34 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDefaultLogLevel.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +0 -8
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKError.h +7 -3
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLog.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLogger.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKProcessingResult.h +0 -4
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKReadabilityResult.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKRotation.h +5 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +2 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +6 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +459 -344
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +0 -6
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/UIImage+GSKUtils.h +12 -3
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +19923 -17290
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +334 -279
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +334 -279
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Assets.car +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/DeviceList.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/PrivacyInfo.xcprivacy +34 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDefaultLogLevel.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +0 -8
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKError.h +7 -3
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLog.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLogger.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKProcessingResult.h +0 -4
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKReadabilityResult.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKRotation.h +5 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +2 -2
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +6 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +932 -702
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +0 -6
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/UIImage+GSKUtils.h +12 -3
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +19923 -17290
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +334 -279
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +334 -279
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +19923 -17290
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +334 -279
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +334 -279
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
- package/ios/RNGeniusScan.m +8 -8
- package/package.json +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditFrameView.h +0 -71
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditFrameViewController.h +0 -62
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditableFrame.h +0 -68
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterType.h +0 -43
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKShutterView.h +0 -28
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKView.h +0 -70
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/png.h +0 -3358
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pngconf.h +0 -615
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pnglibconf.h +0 -233
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditFrameView.h +0 -71
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditFrameViewController.h +0 -62
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditableFrame.h +0 -68
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterType.h +0 -43
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKShutterView.h +0 -28
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKView.h +0 -70
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/png.h +0 -3358
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/pngconf.h +0 -615
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/pnglibconf.h +0 -233
package/README.md
CHANGED
|
@@ -20,10 +20,10 @@ You can try the "demo" version for free without a license key, the only limitati
|
|
|
20
20
|
You need to [set a license key](#set-the-license-key) for unlimited demo time, or for production.
|
|
21
21
|
|
|
22
22
|
To buy a license:
|
|
23
|
-
1. [Sign up](https://
|
|
23
|
+
1. [Sign up](https://portal.geniusscansdk.com/apps) to our developer console
|
|
24
24
|
2. Submit a quote request for each application
|
|
25
25
|
|
|
26
|
-
You can learn more about [licensing](https://geniusscansdk.com/license/licensing) in our website and contact us at
|
|
26
|
+
You can learn more about [licensing](https://geniusscansdk.com/license/licensing) in our website and contact us at sales@geniusscansdk.com for further questions.
|
|
27
27
|
|
|
28
28
|
## Demo application
|
|
29
29
|
|
|
@@ -115,8 +115,8 @@ The method `scanWithConfiguration` takes a `configuration` parameter which can t
|
|
|
115
115
|
- `ocrConfiguration`: text recognition options. Text recognition will run on a background thread for every captured image. No text recognition will be applied if this parameter is not present.
|
|
116
116
|
- `languages`: list of the BCP 47 language codes (eg `["en-US"]`) for which to run text recognition. Note that text recognition will take longer if multiple languages are specified.
|
|
117
117
|
- `outputFormats`: an array with the formats in which the OCR result is made available in the ScanFlow result (defaults to all formats). Possible formats are `rawText`, `hOCR` and `textLayerInPDF`.
|
|
118
|
-
- `structuredData`: an array of the structured data you want to extract. E.g.: `['receipt', 'businessCard']`. Possible values are `receipt`, `
|
|
119
|
-
- `
|
|
118
|
+
- `structuredData`: an array of the structured data you want to extract. E.g.: `['receipt', 'businessCard']`. Possible values are `receipt`, `barcode`, `bankDetails` (iOS only), `businessCard` (iOS only).
|
|
119
|
+
- `structuredDataBarcodeTypes`: an array of the barcode types to extract, e.g. `['qr', 'code39']`. Possible values are `aztec`, `code39`, `code93`, `code128`, `dataMatrix`, `ean8`, `ean13`, `itf`, `pdf417`, `qr`, `upca` (Android only), `upce`, `codabar` (iOS 15+ only), `gs1DataBar` (iOS 15+ only), `microPDF417` (iOS 15+ only), `microQR` (iOS 15+ only), `msiPlessey` (iOS 15+ only).
|
|
120
120
|
- `requiredReadabilityLevel`: the required readability level below which a warning will be displayed to the user. Possible values are `lowest`, `low`, `medium`, `high`, `highest` (default to `lowest`, which means the warning will never be displayed).
|
|
121
121
|
|
|
122
122
|
It returns a promise with `result` object containing:
|
package/android/build.gradle
CHANGED
|
@@ -16,7 +16,7 @@ android {
|
|
|
16
16
|
compileSdkVersion 36
|
|
17
17
|
|
|
18
18
|
defaultConfig {
|
|
19
|
-
minSdkVersion
|
|
19
|
+
minSdkVersion 23
|
|
20
20
|
targetSdkVersion 36
|
|
21
21
|
versionCode 1
|
|
22
22
|
versionName "1.0"
|
|
@@ -42,5 +42,5 @@ rootProject.allprojects {
|
|
|
42
42
|
|
|
43
43
|
dependencies {
|
|
44
44
|
implementation 'com.facebook.react:react-native:+'
|
|
45
|
-
implementation 'com.geniusscansdk:gssdk:
|
|
45
|
+
implementation 'com.geniusscansdk:gssdk:6.0.0-beta02'
|
|
46
46
|
}
|
|
@@ -15,15 +15,17 @@ import com.facebook.react.bridge.ReactMethod;
|
|
|
15
15
|
import com.facebook.react.bridge.ReadableMap;
|
|
16
16
|
import com.facebook.react.bridge.WritableMap;
|
|
17
17
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
18
|
+
import com.geniusscansdk.barcodeflow.BarcodeScanFlow;
|
|
18
19
|
import com.geniusscansdk.scanflow.PluginBridge;
|
|
19
20
|
import com.geniusscansdk.scanflow.PromiseResult;
|
|
21
|
+
import com.geniusscansdk.scanflow.ScanFlow;
|
|
20
22
|
|
|
21
23
|
import java.util.Map;
|
|
22
24
|
|
|
23
25
|
public class RNGeniusScanModule extends ReactContextBaseJavaModule {
|
|
24
26
|
private final ReactApplicationContext reactContext;
|
|
25
27
|
private Promise mScanPromise;
|
|
26
|
-
private Promise
|
|
28
|
+
private Promise mBarcodeScanPromise;
|
|
27
29
|
|
|
28
30
|
public RNGeniusScanModule(ReactApplicationContext reactContext) {
|
|
29
31
|
super(reactContext);
|
|
@@ -55,12 +57,12 @@ public class RNGeniusScanModule extends ReactContextBaseJavaModule {
|
|
|
55
57
|
PromiseResult promiseResult = PluginBridge.getPromiseResultFromActivityResult(requestCode, resultCode, intent);
|
|
56
58
|
if (promiseResult != null) {
|
|
57
59
|
Promise promise = null;
|
|
58
|
-
if (requestCode ==
|
|
60
|
+
if (requestCode == ScanFlow.REQUEST_CODE) {
|
|
59
61
|
promise = mScanPromise;
|
|
60
62
|
mScanPromise = null;
|
|
61
|
-
} else if (requestCode ==
|
|
62
|
-
promise =
|
|
63
|
-
|
|
63
|
+
} else if (requestCode == BarcodeScanFlow.REQUEST_CODE) {
|
|
64
|
+
promise = mBarcodeScanPromise;
|
|
65
|
+
mBarcodeScanPromise = null;
|
|
64
66
|
}
|
|
65
67
|
if (promise != null) {
|
|
66
68
|
resolvePromiseWithPromiseResult(promise, promiseResult);
|
|
@@ -97,13 +99,13 @@ public class RNGeniusScanModule extends ReactContextBaseJavaModule {
|
|
|
97
99
|
|
|
98
100
|
@SuppressWarnings("unused")
|
|
99
101
|
@ReactMethod
|
|
100
|
-
public void
|
|
101
|
-
if (
|
|
102
|
-
Log.w(getName(), "Ignoring
|
|
102
|
+
public void scanBarcodesWithConfiguration(ReadableMap configuration, Promise promise) {
|
|
103
|
+
if (mBarcodeScanPromise != null) {
|
|
104
|
+
Log.w(getName(), "Ignoring scanBarcodesWithConfiguration call as a barcode scan flow is already in progress");
|
|
103
105
|
return;
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
PluginBridge.
|
|
108
|
+
mBarcodeScanPromise = promise;
|
|
109
|
+
PluginBridge.scanBarcodesWithConfiguration(getCurrentActivity(), configuration.toHashMap());
|
|
108
110
|
}
|
|
109
111
|
}
|
package/index.d.ts
CHANGED
|
@@ -17,14 +17,14 @@ export interface ScanOptions {
|
|
|
17
17
|
outputFormats?: string[];
|
|
18
18
|
};
|
|
19
19
|
structuredData?: string[];
|
|
20
|
-
|
|
20
|
+
structuredDataBarcodeTypes?: string[];
|
|
21
21
|
jpegQuality?: number;
|
|
22
22
|
pdfMaxScanDimension?: number;
|
|
23
23
|
multiPageFormat?: 'none' | 'pdf' | 'tiff';
|
|
24
24
|
pdfFontFileUrl?: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export interface
|
|
27
|
+
export interface BarcodeConfiguration {
|
|
28
28
|
isBatchModeEnabled?: boolean;
|
|
29
29
|
supportedCodeTypes?: string[];
|
|
30
30
|
}
|
|
@@ -45,13 +45,13 @@ export interface ScanResult {
|
|
|
45
45
|
scans: Scan[];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export interface
|
|
48
|
+
export interface Barcode {
|
|
49
49
|
value: string;
|
|
50
50
|
type: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export interface
|
|
54
|
-
|
|
53
|
+
export interface BarcodeResult {
|
|
54
|
+
barcodes: Barcode[];
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export interface DocumentGeneratorConfiguration {
|
|
@@ -70,9 +70,9 @@ export interface PDFDocument {
|
|
|
70
70
|
|
|
71
71
|
declare const GeniusScan: {
|
|
72
72
|
scanWithConfiguration(options?: ScanOptions): Promise<ScanResult>;
|
|
73
|
-
|
|
73
|
+
scanBarcodesWithConfiguration(configuration?: BarcodeConfiguration): Promise<BarcodeResult>;
|
|
74
74
|
generateDocument(document: PDFDocument, configuration: DocumentGeneratorConfiguration): Promise<void>;
|
|
75
75
|
setLicenseKey(licenseKey: string, autoRefresh: boolean): Promise<void>;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
export default GeniusScan;
|
|
78
|
+
export default GeniusScan;
|
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const { RNGeniusScan } = NativeModules;
|
|
|
6
6
|
// Mapping to make options optional
|
|
7
7
|
export default {
|
|
8
8
|
scanWithConfiguration: (scanOptions = {}) => RNGeniusScan.scanWithConfiguration(scanOptions),
|
|
9
|
-
|
|
9
|
+
scanBarcodesWithConfiguration: (configuration = {}) => RNGeniusScan.scanBarcodesWithConfiguration(configuration),
|
|
10
10
|
generateDocument: RNGeniusScan.generateDocument,
|
|
11
11
|
setLicenseKey: RNGeniusScan.setLicenseKey
|
|
12
12
|
};
|
|
@@ -10,18 +10,15 @@
|
|
|
10
10
|
<key>DebugSymbolsPath</key>
|
|
11
11
|
<string>dSYMs</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<string>ios-
|
|
13
|
+
<string>ios-arm64</string>
|
|
14
14
|
<key>LibraryPath</key>
|
|
15
15
|
<string>GSSDK.framework</string>
|
|
16
16
|
<key>SupportedArchitectures</key>
|
|
17
17
|
<array>
|
|
18
18
|
<string>arm64</string>
|
|
19
|
-
<string>x86_64</string>
|
|
20
19
|
</array>
|
|
21
20
|
<key>SupportedPlatform</key>
|
|
22
21
|
<string>ios</string>
|
|
23
|
-
<key>SupportedPlatformVariant</key>
|
|
24
|
-
<string>simulator</string>
|
|
25
22
|
</dict>
|
|
26
23
|
<dict>
|
|
27
24
|
<key>BinaryPath</key>
|
|
@@ -29,15 +26,18 @@
|
|
|
29
26
|
<key>DebugSymbolsPath</key>
|
|
30
27
|
<string>dSYMs</string>
|
|
31
28
|
<key>LibraryIdentifier</key>
|
|
32
|
-
<string>ios-
|
|
29
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
33
30
|
<key>LibraryPath</key>
|
|
34
31
|
<string>GSSDK.framework</string>
|
|
35
32
|
<key>SupportedArchitectures</key>
|
|
36
33
|
<array>
|
|
37
34
|
<string>arm64</string>
|
|
35
|
+
<string>x86_64</string>
|
|
38
36
|
</array>
|
|
39
37
|
<key>SupportedPlatform</key>
|
|
40
38
|
<string>ios</string>
|
|
39
|
+
<key>SupportedPlatformVariant</key>
|
|
40
|
+
<string>simulator</string>
|
|
41
41
|
</dict>
|
|
42
42
|
</array>
|
|
43
43
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
9
|
+
<string>NSPrivacyCollectedDataTypeOtherDataTypes</string>
|
|
10
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
11
|
+
<false/>
|
|
12
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
13
|
+
<false/>
|
|
14
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
15
|
+
<array>
|
|
16
|
+
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
|
17
|
+
</array>
|
|
18
|
+
</dict>
|
|
19
|
+
</array>
|
|
20
|
+
<key>NSPrivacyTracking</key>
|
|
21
|
+
<false/>
|
|
22
|
+
<key>NSPrivacyAccessedAPITypes</key>
|
|
23
|
+
<array>
|
|
24
|
+
<dict>
|
|
25
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
26
|
+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
|
27
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
28
|
+
<array>
|
|
29
|
+
<string>CA92.1</string>
|
|
30
|
+
</array>
|
|
31
|
+
</dict>
|
|
32
|
+
</array>
|
|
33
|
+
</dict>
|
|
34
|
+
</plist>
|
|
Binary file
|
|
@@ -52,6 +52,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
52
52
|
@end
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
+
Detects the frame of a document in an image.
|
|
56
|
+
|
|
55
57
|
- Performance:
|
|
56
58
|
A document detector can be expensive to create: it's recommended to keep a reference to it if it's needed several times in a row.
|
|
57
59
|
*/
|
|
@@ -61,12 +63,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
61
63
|
- (instancetype)init;
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
|
-
Detects the quadrangle corresponding to the edges of a document in video frame
|
|
66
|
+
Detects the quadrangle corresponding to the edges of a document in a video frame
|
|
65
67
|
|
|
66
68
|
@param sampleBuffer a YCbCr sample buffer of a video frame. Make sure the video output generating these frames is configured with the pixel format kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
|
|
67
69
|
@param error On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
|
|
68
70
|
|
|
69
|
-
@return The detected quadrangle or nil if an error
|
|
71
|
+
@return The detected quadrangle or nil if an error occurred.
|
|
70
72
|
*/
|
|
71
73
|
- (GSKDocumentDetectionResult * _Nullable)detectDocumentInSampleBuffer:(CMSampleBufferRef)sampleBuffer error:(NSError * _Nullable *)error;
|
|
72
74
|
|
|
@@ -76,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
76
78
|
@param image The photo to detect a document in
|
|
77
79
|
@param error On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
|
|
78
80
|
|
|
79
|
-
@return The detected quadrangle or nil if an error
|
|
81
|
+
@return The detected quadrangle or nil if an error occurred.
|
|
80
82
|
*/
|
|
81
83
|
- (GSKDocumentDetectionResult * _Nullable)detectDocumentInImage:(UIImage *)image error:(NSError * _Nullable *)error;
|
|
82
84
|
|
package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEnhancementConfiguration.h
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
10
|
#import <GSSDK/GSKFilterColorPalette.h>
|
|
11
11
|
#import <GSSDK/GSKFilterStyle.h>
|
|
12
|
-
#import <GSSDK/GSKFilterType.h>
|
|
13
12
|
|
|
14
13
|
@class GSKFilterConfiguration;
|
|
15
14
|
|
|
@@ -34,13 +33,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
34
33
|
*/
|
|
35
34
|
+ (instancetype)automaticEnhancementConfigurationWithColorPalette:(GSKFilterColorPalette)colorPalette NS_SWIFT_NAME(automatic(colorPalette:));
|
|
36
35
|
|
|
37
|
-
/**
|
|
38
|
-
An enhancement configuration that will result in using the specified legacy filter.
|
|
39
|
-
|
|
40
|
-
Deprecated.
|
|
41
|
-
*/
|
|
42
|
-
+ (instancetype)enhancementConfigurationWithFilter:(GSKFilterType)filter DEPRECATED_MSG_ATTRIBUTE("Use `filterConfiguration` instead.");
|
|
43
|
-
|
|
44
36
|
/**
|
|
45
37
|
An enhancement configuration that will result in using the specified filter.
|
|
46
38
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Copyright 2010-2020 The Grizzly Labs
|
|
5
5
|
//
|
|
6
6
|
// Subject to the Genius Scan SDK Licensing Agreement
|
|
7
|
-
//
|
|
7
|
+
// sales@geniusscansdk.com
|
|
8
8
|
//
|
|
9
9
|
|
|
10
10
|
#ifndef GSKError_h
|
|
@@ -17,7 +17,7 @@ FOUNDATION_EXPORT NSString * const GSKErrorDomain;
|
|
|
17
17
|
typedef NS_ENUM(NSInteger, GSKError) {
|
|
18
18
|
/// An license key related error.
|
|
19
19
|
GSKLicenseError = 1000,
|
|
20
|
-
/// An internal error. Please report it to
|
|
20
|
+
/// An internal error. Please report it to support@geniusscansdk.com with output logs.
|
|
21
21
|
GSKInternalError = 1001,
|
|
22
22
|
/// An image processing error
|
|
23
23
|
GSKProcessingError = 1002,
|
|
@@ -26,9 +26,13 @@ typedef NS_ENUM(NSInteger, GSKError) {
|
|
|
26
26
|
/// A file not found error
|
|
27
27
|
GSKFileNotFound = 1004,
|
|
28
28
|
/// A memory (not storage) error
|
|
29
|
-
GSKMemoryError = 1005
|
|
29
|
+
GSKMemoryError = 1005,
|
|
30
|
+
/// A capture session error
|
|
31
|
+
GSKCaptureError = 1006
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
FOUNDATION_EXPORT NSString * const GSKPDFErrorDomain;
|
|
33
35
|
|
|
36
|
+
FOUNDATION_EXPORT NSError *GSKErrorToNSError(GSKError code, NSString *description);
|
|
37
|
+
|
|
34
38
|
#endif /* GSKError_h */
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
10
|
|
|
11
|
-
#import <GSSDK/GSKFilterType.h>
|
|
12
11
|
#import <GSSDK/GSKRotation.h>
|
|
13
12
|
|
|
14
13
|
@class GSKQuadrangle;
|
|
@@ -25,9 +24,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
25
24
|
/// The quadrangle that was used for perspective correction
|
|
26
25
|
@property (nonatomic, strong, readonly) GSKQuadrangle *appliedQuadrangle;
|
|
27
26
|
|
|
28
|
-
/// The filter that was applied during the enhancement phase
|
|
29
|
-
@property (nonatomic, assign, readonly) GSKFilterType appliedFilter __deprecated_msg("Use appliedFilterConfiguration instead.");
|
|
30
|
-
|
|
31
27
|
/// The filter that was applied during the enhancement phase
|
|
32
28
|
@property (nonatomic, strong, readonly) GSKFilterConfiguration *appliedFilterConfiguration;
|
|
33
29
|
|
|
@@ -9,14 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
#import <Foundation/Foundation.h>
|
|
11
11
|
#import <CoreGraphics/CoreGraphics.h>
|
|
12
|
-
|
|
12
|
+
#import <GSSDK/GSKRotation.h>
|
|
13
13
|
#import <UIKit/UIKit.h>
|
|
14
|
-
#import "GSKRotation.h"
|
|
15
|
-
|
|
16
|
-
extern const CGPoint GSKQuadrangleTopRightPoint;
|
|
17
|
-
extern const CGPoint GSKQuadrangleTopLeftPoint;
|
|
18
|
-
extern const CGPoint GSKQuadrangleBottomLeftPoint;
|
|
19
|
-
extern const CGPoint GSKQuadrangleBottomRightPoint;
|
|
20
14
|
|
|
21
15
|
NS_ASSUME_NONNULL_BEGIN
|
|
22
16
|
|
|
@@ -13,9 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
/// Defines an image rotation by increment of 90 degrees.
|
|
15
15
|
typedef NS_ENUM(NSInteger, GSKRotation) {
|
|
16
|
+
/// No rotation
|
|
16
17
|
GSKRotationNone = 0,
|
|
18
|
+
/// Clockwise rotation, or rotation to the right
|
|
17
19
|
GSKRotationClockwise = 1,
|
|
18
|
-
|
|
20
|
+
// 180 degree rotation
|
|
21
|
+
GSKRotationUpsideDown = 2,
|
|
22
|
+
// Counter-clockwise rotation, or rotation to the left
|
|
19
23
|
GSKRotationCounterClockwise = 3
|
|
20
24
|
};
|
|
21
25
|
|
package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h
CHANGED
|
@@ -12,8 +12,8 @@ typedef NS_OPTIONS(NSUInteger, GSKScanFlowStructuredData) {
|
|
|
12
12
|
GSKScanFlowStructuredDataBusinessCard = 1 << 1,
|
|
13
13
|
/// To scan receipt/invoice information
|
|
14
14
|
GSKScanFlowStructuredDataReceipt = 1 << 2,
|
|
15
|
-
/// To scan barcodes and QR codes. The SDK can detect multiple
|
|
16
|
-
|
|
15
|
+
/// To scan barcodes and QR codes. The SDK can detect multiple barcodes on a single page.
|
|
16
|
+
GSKScanFlowStructuredDataBarcode = 1 << 3,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
#endif
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
#import <Foundation/Foundation.h>
|
|
12
12
|
#import <UIKit/UIKit.h>
|
|
13
13
|
|
|
14
|
-
#import <GSSDK/GSKFilterType.h>
|
|
15
14
|
#import <GSSDK/GSKRotation.h>
|
|
16
15
|
|
|
17
16
|
NS_ASSUME_NONNULL_BEGIN
|
|
@@ -33,9 +32,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
33
32
|
The document processor is the central class of the GSSDK's image processing algorithms.
|
|
34
33
|
|
|
35
34
|
With the document processor, you can correct the distortion in your documents, as well as improve their legibility.
|
|
36
|
-
|
|
35
|
+
The scan processor can also analyze the scan and evaluate its readability.
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
If you are only interested in detecting a document in an image, please refer to ``GSKDocumentDetector``. If you are looking to detect whether an image contains a document, use ``GSKDocumentFinder`` instead.
|
|
38
|
+
|
|
39
|
+
Warning: `GSKScanProcessor` is not thread-safe; you shouldn't reuse the same instance across threads.
|
|
39
40
|
*/
|
|
40
41
|
@interface GSKScanProcessor : NSObject
|
|
41
42
|
|
|
@@ -45,8 +46,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
45
46
|
|
|
46
47
|
@param configuration The configuration of the different steps of the processing.
|
|
47
48
|
|
|
48
|
-
@returns The result of the processing, nil if there is an error. The
|
|
49
|
-
as well as the temporary path
|
|
49
|
+
@returns The result of the processing, nil if there is an error. The result includes the parameters that have been selected for the different processing steps,
|
|
50
|
+
as well as the temporary path where the output was written. The output is written in a temporary folder. The caller can take ownership of this file.
|
|
50
51
|
By default, the best output format will be chosen by this method. For instance, if the monochrome enhancement was selected, the output will not
|
|
51
52
|
be saved as JPEG but as a 1-bit PNG image. The result's processedImagePath file extension will reflect this.
|
|
52
53
|
*/
|