@thegrizzlylabs/react-native-genius-scan 4.18.0 → 4.20.0
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 +10 -16
- package/RNGeniusScan.podspec +1 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/geniusscansdk/reactnative/RNGeniusScanModule.java +8 -1
- package/index.js +8 -1
- package/ios/GSSDK/GSSDKCore.xcframework/Info.plist +5 -5
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64/GSSDKCore.framework/GSSDKCore +0 -0
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64/GSSDKCore.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/GSSDKCore +0 -0
- package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKOCR.xcframework/Info.plist +5 -5
- package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64/GSSDKOCR.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/GSSDKScanFlow +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSKScanFlow.h +49 -2
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSKScanFlowScanInternal.h +9 -2
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSSDKScanFlow-Swift.h +12 -1
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSSDKScanFlow.h +1 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.abi.json +1197 -18
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.private.swiftinterface +20 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios.swiftinterface +20 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/ar.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/da.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/de.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/es.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/he.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/id.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/it.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/ja.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/ko.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/nl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/pt-BR.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/ru.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/sv.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/tr.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/vi.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/zh-Hans.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/zh-Hant.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/GSSDKScanFlow +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSKScanFlow.h +49 -2
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSKScanFlowScanInternal.h +9 -2
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSSDKScanFlow-Swift.h +24 -2
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Headers/GSSDKScanFlow.h +1 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.abi.json +1197 -18
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +20 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/arm64-apple-ios-simulator.swiftinterface +20 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.abi.json +1197 -18
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +20 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/Modules/GSSDKScanFlow.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +20 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/ar.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/da.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/de.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/es.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/he.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/id.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/it.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/ja.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/ko.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/nl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/pt-BR.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/ru.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/sv.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/tr.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/vi.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/zh-Hans.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/zh-Hant.lproj/GSSDK.strings +0 -0
- package/ios/RNGeniusScan.m +5 -0
- package/package.json +1 -1
- /package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/{PrivateHeaders → Headers}/GSKScanFlowResult+Dictionary.h +0 -0
- /package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64_x86_64-simulator/GSSDKScanFlow.framework/{PrivateHeaders → Headers}/GSKScanFlowResult+Dictionary.h +0 -0
package/README.md
CHANGED
|
@@ -11,16 +11,16 @@ This React Native component allows you to access the [Genius Scan SDK](https://g
|
|
|
11
11
|
- Batch scanning of several pages in row
|
|
12
12
|
- OCR to extract raw text from images and generate PDF with invisible text layer
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## License
|
|
15
15
|
|
|
16
|
-
This
|
|
17
|
-
You can
|
|
16
|
+
This plugin is based on the Genius Scan SDK for which you need to [setup a license](#set-the-license-key).
|
|
17
|
+
You can aleady try the "demo" version for free by not setting a license key, the only limitation being that the app will exit after 60 seconds.
|
|
18
18
|
|
|
19
19
|
To buy a license:
|
|
20
20
|
1. [Sign up](https://sdk.geniusscan.com/apps) to our developer console
|
|
21
21
|
2. Submit a quote request for each application
|
|
22
22
|
|
|
23
|
-
You can learn more about [licensing](https://geniusscansdk.com/license/licensing)
|
|
23
|
+
You can learn more about [licensing](https://geniusscansdk.com/license/licensing) in our website and contact us at sdk@geniusscan.com for further questions.
|
|
24
24
|
|
|
25
25
|
## Demo application
|
|
26
26
|
|
|
@@ -59,15 +59,15 @@ Run `pod install` from the ios folder
|
|
|
59
59
|
|
|
60
60
|
## Usage
|
|
61
61
|
|
|
62
|
-
### Set the
|
|
62
|
+
### Set the license key
|
|
63
63
|
|
|
64
|
-
Initialize the SDK with a valid
|
|
64
|
+
Initialize the SDK with a valid license key:
|
|
65
65
|
|
|
66
66
|
```javascript
|
|
67
|
-
RNGeniusScan.
|
|
67
|
+
RNGeniusScan.setLicenseKey(licenseKey, /* autoRefresh = */ true)
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
`setLicenseKey`
|
|
70
|
+
`setLicenseKey` doesn't return anything. However, other methods of the plugin will fail if the license key is invalid or expired. Note that, for testing purpose, you can also use the plugin without setting a license key, but it will only work for 60 seconds.
|
|
71
71
|
|
|
72
72
|
**It is recommended to show a message to users asking them to update the application in case the license has expired.**
|
|
73
73
|
|
|
@@ -137,10 +137,7 @@ The `configuration` parameter provides the following options:
|
|
|
137
137
|
```javascript
|
|
138
138
|
import RNGeniusScan from '@thegrizzlylabs/react-native-genius-scan';
|
|
139
139
|
|
|
140
|
-
RNGeniusScan.
|
|
141
|
-
.then(() => {
|
|
142
|
-
return RNGeniusScan.scanWithConfiguration({ source: 'camera'})
|
|
143
|
-
})
|
|
140
|
+
RNGeniusScan.scanWithConfiguration({ source: 'camera'})
|
|
144
141
|
.then((result) => {
|
|
145
142
|
// Do something with the result
|
|
146
143
|
})
|
|
@@ -156,10 +153,7 @@ import RNGeniusScan from '@thegrizzlylabs/react-native-genius-scan';
|
|
|
156
153
|
|
|
157
154
|
const imageUri = 'file://xxxxx' // imageUri from an existing file
|
|
158
155
|
|
|
159
|
-
RNGeniusScan.
|
|
160
|
-
.then(() => {
|
|
161
|
-
return RNGeniusScan.scanWithConfiguration({ source: 'image', sourceImageUrl: imageUri })
|
|
162
|
-
})
|
|
156
|
+
RNGeniusScan.scanWithConfiguration({ source: 'image', sourceImageUrl: imageUri })
|
|
163
157
|
.then((result) => {
|
|
164
158
|
// Do something with the enhanced image
|
|
165
159
|
})
|
package/RNGeniusScan.podspec
CHANGED
package/android/build.gradle
CHANGED
|
@@ -41,6 +41,6 @@ rootProject.allprojects {
|
|
|
41
41
|
|
|
42
42
|
dependencies {
|
|
43
43
|
implementation 'com.facebook.react:react-native:+'
|
|
44
|
-
implementation 'com.geniusscansdk:gssdk-scanflow:4.
|
|
45
|
-
implementation 'com.geniusscansdk:gssdk-ocr:4.
|
|
44
|
+
implementation 'com.geniusscansdk:gssdk-scanflow:4.20.0'
|
|
45
|
+
implementation 'com.geniusscansdk:gssdk-ocr:4.20.0'
|
|
46
46
|
}
|
|
@@ -72,10 +72,17 @@ public class RNGeniusScanModule extends ReactContextBaseJavaModule {
|
|
|
72
72
|
resolvePromiseWithPromiseResult(promise, promiseResult);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
@SuppressWarnings("unused")
|
|
76
|
+
@ReactMethod
|
|
77
|
+
public void setLicenseKey(String licenseKey, boolean autoRefresh, Promise promise) {
|
|
78
|
+
PluginBridge.setLicenseKey(this.reactContext, licenseKey, autoRefresh);
|
|
79
|
+
promise.resolve(null);
|
|
80
|
+
}
|
|
81
|
+
|
|
75
82
|
@SuppressWarnings("unused")
|
|
76
83
|
@ReactMethod
|
|
77
84
|
public void setLicenceKey(String licenseKey, Promise promise) {
|
|
78
85
|
PromiseResult promiseResult = PluginBridge.setLicenseKey(this.reactContext, licenseKey);
|
|
79
86
|
resolvePromiseWithPromiseResult(promise, promiseResult);
|
|
80
87
|
}
|
|
81
|
-
}
|
|
88
|
+
}
|
package/index.js
CHANGED
|
@@ -7,5 +7,12 @@ const { RNGeniusScan } = NativeModules;
|
|
|
7
7
|
export default {
|
|
8
8
|
scanWithConfiguration: (scanOptions = {}) => RNGeniusScan.scanWithConfiguration(scanOptions),
|
|
9
9
|
generateDocument: RNGeniusScan.generateDocument,
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
setLicenceKey: (key) => {
|
|
14
|
+
console.warn("setLicenceKey is deprecated. Please use setLicenseKey instead.")
|
|
15
|
+
RNGeniusScan.setLicenceKey(key)
|
|
16
|
+
},
|
|
17
|
+
setLicenseKey: RNGeniusScan.setLicenseKey
|
|
11
18
|
};
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>DebugSymbolsPath</key>
|
|
9
9
|
<string>dSYMs</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>GSSDKCore.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>DebugSymbolsPath</key>
|
|
23
26
|
<string>dSYMs</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>GSSDKCore.framework</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/GSSDKCore
CHANGED
|
Binary file
|
package/ios/GSSDK/GSSDKCore.xcframework/ios-arm64_x86_64-simulator/GSSDKCore.framework/Info.plist
CHANGED
|
Binary file
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>DebugSymbolsPath</key>
|
|
9
9
|
<string>dSYMs</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>GSSDKOCR.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>DebugSymbolsPath</key>
|
|
23
26
|
<string>dSYMs</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>GSSDKOCR.framework</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
package/ios/GSSDK/GSSDKOCR.xcframework/ios-arm64_x86_64-simulator/GSSDKOCR.framework/Info.plist
CHANGED
|
Binary file
|
|
Binary file
|
package/ios/GSSDK/GSSDKScanFlow.xcframework/ios-arm64/GSSDKScanFlow.framework/Headers/GSKScanFlow.h
CHANGED
|
@@ -17,7 +17,7 @@ typedef NS_ENUM(NSInteger, GSKScanFlowError) {
|
|
|
17
17
|
/// User has canceled the scan flow
|
|
18
18
|
GSKScanFlowUserCancelationError = 999,
|
|
19
19
|
/// A general error due to a bad input parameter. Verify that your input match the API requirements.
|
|
20
|
-
GSKScanFlowBadInputError = 1000
|
|
20
|
+
GSKScanFlowBadInputError = 1000
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -38,6 +38,15 @@ typedef NS_OPTIONS(NSUInteger, GSKScanFlowOCROutputFormats) {
|
|
|
38
38
|
GSKScanFlowOCROutputFormatsAll = NSUIntegerMax,
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
The types of structured data to extract.
|
|
43
|
+
*/
|
|
44
|
+
typedef NS_OPTIONS(NSUInteger, GSKScanFlowStructuredData) {
|
|
45
|
+
GSKScanFlowStructuredDataNone = 0,
|
|
46
|
+
/// To scan IBAN and BIC/SWIFT codes
|
|
47
|
+
GSKScanFlowStructuredDataBankDetails = 1 << 0
|
|
48
|
+
};
|
|
49
|
+
|
|
41
50
|
/**
|
|
42
51
|
The configuration for text recognition
|
|
43
52
|
*/
|
|
@@ -180,6 +189,14 @@ typedef NS_ENUM(NSUInteger, GSKScanFlowMultiPageFormat) {
|
|
|
180
189
|
*/
|
|
181
190
|
@property (nonatomic, assign) GSKScanFlowFilterType defaultFilter;
|
|
182
191
|
|
|
192
|
+
/**
|
|
193
|
+
Skips showing the post-processing screen.
|
|
194
|
+
|
|
195
|
+
We only recommend this option when scanning structured data. Generally, you want the user to visually confirm
|
|
196
|
+
the quality of the scan.
|
|
197
|
+
*/
|
|
198
|
+
@property (nonatomic, assign) BOOL skipPostProcessingScreen;
|
|
199
|
+
|
|
183
200
|
/**
|
|
184
201
|
Select which actions are displayed in the post processing screen
|
|
185
202
|
|
|
@@ -274,6 +291,13 @@ typedef NS_ENUM(NSUInteger, GSKScanFlowMultiPageFormat) {
|
|
|
274
291
|
*/
|
|
275
292
|
@property (nonatomic, strong, nullable) GSKScanFlowOCRConfiguration *ocrConfiguration;
|
|
276
293
|
|
|
294
|
+
/**
|
|
295
|
+
The types of structured data you want to extract from the document.
|
|
296
|
+
|
|
297
|
+
This is an option set so you can combine multiple values.
|
|
298
|
+
*/
|
|
299
|
+
@property (nonatomic, assign) GSKScanFlowStructuredData structuredData;
|
|
300
|
+
|
|
277
301
|
@end
|
|
278
302
|
|
|
279
303
|
/**
|
|
@@ -289,6 +313,26 @@ typedef NS_ENUM(NSUInteger, GSKScanFlowMultiPageFormat) {
|
|
|
289
313
|
|
|
290
314
|
@end
|
|
291
315
|
|
|
316
|
+
@interface GSKScanFlowStructuredDataResultBankDetails: NSObject
|
|
317
|
+
|
|
318
|
+
/// The IBAN if successfully extracted, otherwise is nil.
|
|
319
|
+
@property (nonatomic, strong, nullable) NSString *iban;
|
|
320
|
+
|
|
321
|
+
/// The BIC code if successfully extracted, otherwise is nil.
|
|
322
|
+
@property (nonatomic, strong, nullable) NSString *bic;
|
|
323
|
+
|
|
324
|
+
@end
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
The result of a structured data extraction.
|
|
328
|
+
*/
|
|
329
|
+
@interface GSKScanFlowStructuredDataResult: NSObject
|
|
330
|
+
|
|
331
|
+
/// Present if bank details extraction was requested, nil otherwise.
|
|
332
|
+
@property (nonatomic, strong, nullable) GSKScanFlowStructuredDataResultBankDetails *bankDetails;
|
|
333
|
+
|
|
334
|
+
@end
|
|
335
|
+
|
|
292
336
|
/**
|
|
293
337
|
A page captured by the scan flow.
|
|
294
338
|
*/
|
|
@@ -304,7 +348,10 @@ typedef NS_ENUM(NSUInteger, GSKScanFlowMultiPageFormat) {
|
|
|
304
348
|
@property (nonatomic, strong) NSString *enhancedFilePath;
|
|
305
349
|
|
|
306
350
|
/// If OCR was performed, the recognized text.
|
|
307
|
-
@property (nonatomic, strong) GSKScanFlowOCRResult *ocrResult;
|
|
351
|
+
@property (nonatomic, strong, nullable) GSKScanFlowOCRResult *ocrResult;
|
|
352
|
+
|
|
353
|
+
/// If structured data extraction was performed, the structured data.
|
|
354
|
+
@property (nonatomic, strong, nullable) GSKScanFlowStructuredDataResult *structuredDataResult;
|
|
308
355
|
|
|
309
356
|
@end
|
|
310
357
|
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
#import <GSSDKCore/GSSDKCore.h>
|
|
12
12
|
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
13
15
|
@class GSKOCRResult;
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -45,7 +47,12 @@
|
|
|
45
47
|
@property (nonatomic, assign) GSKRotation appliedRotation;
|
|
46
48
|
|
|
47
49
|
/// If OCR was performed, the recognized text.
|
|
48
|
-
@property (nonatomic, strong) GSKOCRResult *ocrResult;
|
|
50
|
+
@property (nonatomic, strong, nullable) GSKOCRResult *ocrResult;
|
|
51
|
+
|
|
52
|
+
/// If bank details extraction was performed and successful, the extracted IBAN, otherwise nil.
|
|
53
|
+
@property (nonatomic, strong, nullable) NSString *structuredDataIBAN;
|
|
54
|
+
/// If bank details extraction was performed and successful, the extracted BIC, otherwise nil.
|
|
55
|
+
@property (nonatomic, strong, nullable) NSString *structuredDataBIC;
|
|
49
56
|
|
|
50
57
|
/// Deletes all the files related to this scan. Convenient to clean up after you copied
|
|
51
58
|
/// what you needed.
|
|
@@ -53,4 +60,4 @@
|
|
|
53
60
|
|
|
54
61
|
@end
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -296,6 +296,18 @@ SWIFT_CLASS("_TtC13GSSDKScanFlow33BVImageContentViewObjCWrapperView")
|
|
|
296
296
|
@end
|
|
297
297
|
|
|
298
298
|
|
|
299
|
+
@class GSKScanFlowScanInternal;
|
|
300
|
+
@class GSKScanFlowConfiguration;
|
|
301
|
+
|
|
302
|
+
SWIFT_CLASS("_TtC13GSSDKScanFlow32GSKScanFlowStructuredDataService")
|
|
303
|
+
@interface GSKScanFlowStructuredDataService : NSObject
|
|
304
|
+
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKScanFlowStructuredDataService * _Nonnull shared;)
|
|
305
|
+
+ (GSKScanFlowStructuredDataService * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
|
|
306
|
+
- (void)process:(GSKScanFlowScanInternal * _Nonnull)scan configuration:(GSKScanFlowConfiguration * _Nonnull)configuration;
|
|
307
|
+
- (void)waitForCompletion:(void (^ _Nonnull)(void))onDone;
|
|
308
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
309
|
+
@end
|
|
310
|
+
|
|
299
311
|
|
|
300
312
|
SWIFT_CLASS("_TtC13GSSDKScanFlow25GSKUIBackgroundProcessing")
|
|
301
313
|
@interface GSKUIBackgroundProcessing : NSObject
|
|
@@ -305,7 +317,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
|
|
|
305
317
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
306
318
|
@end
|
|
307
319
|
|
|
308
|
-
@class GSKScanFlowScanInternal;
|
|
309
320
|
@class GSKScanFlowOCRConfiguration;
|
|
310
321
|
|
|
311
322
|
SWIFT_CLASS("_TtC13GSSDKScanFlow15GSKUIOCRService")
|