@thegrizzlylabs/react-native-genius-scan 6.0.0-beta13 → 6.1.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 +20 -7
- package/android/build.gradle +1 -1
- package/index.d.ts +15 -0
- 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/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKCurvatureCorrectionConfiguration.h +11 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKCurvatureLevel.h +28 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKCurvatureResult.h +26 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKProcessingResult.h +6 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +89 -15
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +2 -0
- 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 +2742 -2493
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +12 -111
- 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 +12 -111
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/module.modulemap +0 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.strings +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/he.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +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/Info.plist +0 -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/GSKCurvatureCorrectionConfiguration.h +11 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKCurvatureLevel.h +28 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKCurvatureResult.h +26 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKProcessingResult.h +6 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +178 -30
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +2 -0
- 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 +2742 -2493
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +12 -111
- 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 +12 -111
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +2742 -2493
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +12 -111
- 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 +12 -111
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/module.modulemap +0 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.strings +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/he.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,10 +121,10 @@ The method `scanWithConfiguration` takes a `configuration` parameter which can t
|
|
|
121
121
|
|
|
122
122
|
It returns a promise with `result` object containing:
|
|
123
123
|
|
|
124
|
-
- `multiPageDocumentUrl`: a document containing all the scanned pages (example: "file
|
|
124
|
+
- `multiPageDocumentUrl`: a document containing all the scanned pages (example: "file:///path/to/file.pdf")
|
|
125
125
|
- `scans`: an array of scan objects. Each scan object has:
|
|
126
|
-
- `originalUrl`: the original file as scanned from the camera. "file
|
|
127
|
-
- `enhancedUrl`: the cropped and enhanced file, as processed by the SDK. "file
|
|
126
|
+
- `originalUrl`: the original file as scanned from the camera. "file:///path/to/file.jpeg"
|
|
127
|
+
- `enhancedUrl`: the cropped and enhanced file, as processed by the SDK. "file:///path/to/file.{jpeg|png}"
|
|
128
128
|
- `ocrResult`: the result of text recognition for this scan
|
|
129
129
|
- `text`: the raw text that was recognized
|
|
130
130
|
- `hocrTextLayout`: the recognized text in [hOCR](https://en.wikipedia.org/wiki/HOCR) format (with position, style…)
|
|
@@ -152,12 +152,12 @@ await RNGeniusScan.generateDocument(document, configuration)
|
|
|
152
152
|
The `document` parameter is a map containing the following values:
|
|
153
153
|
|
|
154
154
|
- `pages`: an array of page objects. Each page object has:
|
|
155
|
-
- `imageUrl`: the URL of the PNG or JPEG image file for this page, e.g. `file
|
|
155
|
+
- `imageUrl`: the URL of the PNG or JPEG image file for this page, e.g. `file:///path/to/file.{jpeg|png}`
|
|
156
156
|
- `hocrTextLayout`: the text layout in hOCR format
|
|
157
157
|
|
|
158
158
|
The `configuration` parameter provides the following options:
|
|
159
159
|
|
|
160
|
-
- `outputFileUrl`: the URL where the document should be generated, e.g. `file
|
|
160
|
+
- `outputFileUrl`: the URL where the document should be generated, e.g. `file:///path/to/file.pdf`
|
|
161
161
|
- `pdfFontFileUrl`: Custom font file used during the PDF generation to embed an invisible text layer. If null, a default font is used, which only supports Latin languages.
|
|
162
162
|
|
|
163
163
|
|
|
@@ -198,10 +198,23 @@ RNGeniusScan.scanWithConfiguration({ source: 'image', sourceImageUrl: imageUri }
|
|
|
198
198
|
Errors are rejected with a structured payload:
|
|
199
199
|
|
|
200
200
|
- `code`: standardized error code
|
|
201
|
-
- `message`:
|
|
202
|
-
- `recovery_message`: recovery suggestion (may be empty)
|
|
201
|
+
- `message`: developer-facing diagnostic message
|
|
202
|
+
- `recovery_message`: developer-facing recovery suggestion (may be empty)
|
|
203
203
|
- `underlying_error`: stringified underlying error (may be empty)
|
|
204
204
|
|
|
205
|
+
The `code` field is one of:
|
|
206
|
+
|
|
207
|
+
| Code | Description | Suggested handling |
|
|
208
|
+
| --- | --- | --- |
|
|
209
|
+
| `cancellation_error` | The user canceled the document or barcode scan flow. | Treat as a normal exit; do not show an error. |
|
|
210
|
+
| `configuration_error` | The configuration or input parameters are invalid. | Fix the configuration before retrying. |
|
|
211
|
+
| `licensing_error` | The license key is invalid, expired, or not initialized. | Verify the license key and contact support if needed. |
|
|
212
|
+
| `capture_error` | The camera or capture session failed. | Let the user retry; restart the device if the problem persists. |
|
|
213
|
+
| `storage_space_error` | There is not enough storage space to write generated files. | Ask the user to free up storage space and retry. |
|
|
214
|
+
| `internal_error` | An unexpected SDK error occurred. | Show a generic error and collect `underlying_error` for diagnostics. |
|
|
215
|
+
|
|
216
|
+
`message` and `recovery_message` are English diagnostics for developers. They are not intended to be displayed directly to end users; use `code` to choose your own localized user-facing message.
|
|
217
|
+
|
|
205
218
|
Example:
|
|
206
219
|
|
|
207
220
|
```javascript
|
package/android/build.gradle
CHANGED
package/index.d.ts
CHANGED
|
@@ -54,6 +54,21 @@ export interface BarcodeResult {
|
|
|
54
54
|
barcodes: Barcode[];
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
export type GeniusScanErrorCode =
|
|
58
|
+
| 'cancellation_error'
|
|
59
|
+
| 'configuration_error'
|
|
60
|
+
| 'licensing_error'
|
|
61
|
+
| 'capture_error'
|
|
62
|
+
| 'storage_space_error'
|
|
63
|
+
| 'internal_error';
|
|
64
|
+
|
|
65
|
+
export interface GeniusScanError {
|
|
66
|
+
code: GeniusScanErrorCode;
|
|
67
|
+
message: string;
|
|
68
|
+
recovery_message: string;
|
|
69
|
+
underlying_error: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
57
72
|
export interface DocumentGeneratorConfiguration {
|
|
58
73
|
outputFileUrl: string;
|
|
59
74
|
pdfFontFileUrl?: string;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,19 +10,25 @@
|
|
|
10
10
|
|
|
11
11
|
NS_ASSUME_NONNULL_BEGIN
|
|
12
12
|
|
|
13
|
-
/// A GSKCurvatureCorrectionConfiguration defines the behavior of a GSKScanProcessor when applying curvature correction.
|
|
13
|
+
/// A GSKCurvatureCorrectionConfiguration defines the behavior of a GSKScanProcessor when evaluating or applying curvature correction.
|
|
14
14
|
@interface GSKCurvatureCorrectionConfiguration : NSObject
|
|
15
15
|
|
|
16
|
-
/// The default configuration. This
|
|
17
|
-
/// of the SDK.
|
|
16
|
+
/// The default configuration. This doesn't evaluate or apply curvature correction.
|
|
18
17
|
+ (instancetype)defaultCurvatureCorrectionConfiguration;
|
|
19
18
|
|
|
20
|
-
/// No curvature correction
|
|
19
|
+
/// No curvature evaluation or correction.
|
|
21
20
|
+ (instancetype)noCurvatureCorrectionConfiguration;
|
|
22
21
|
|
|
23
|
-
///
|
|
22
|
+
/// Evaluate curvature distortion without correcting it.
|
|
23
|
+
+ (instancetype)evaluationOnlyCurvatureCorrectionConfiguration;
|
|
24
|
+
|
|
25
|
+
/// Specifies whether or not you want curvature correction. Passing `NO` disables both evaluation and correction.
|
|
24
26
|
+ (instancetype)curvatureCorrectionConfigurationWithCurvatureCorrection:(BOOL)curvatureCorrection;
|
|
25
27
|
|
|
28
|
+
/// Specifies whether or not you want curvature correction, and whether distortion should still be evaluated when correction is disabled.
|
|
29
|
+
+ (instancetype)curvatureCorrectionConfigurationWithCurvatureCorrection:(BOOL)curvatureCorrection
|
|
30
|
+
evaluationOnly:(BOOL)evaluationOnly;
|
|
31
|
+
|
|
26
32
|
@end
|
|
27
33
|
|
|
28
34
|
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Genius Scan SDK
|
|
3
|
+
//
|
|
4
|
+
// Copyright 2010-2025 The Grizzly Labs
|
|
5
|
+
//
|
|
6
|
+
// Subject to the Genius Scan SDK Licensing Agreement
|
|
7
|
+
// sdk@thegrizzlylabs.com
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
#ifndef GSKCurvatureLevel_h
|
|
11
|
+
#define GSKCurvatureLevel_h
|
|
12
|
+
|
|
13
|
+
/// Enum describing various curvature levels, which estimates distortion caused by non-flat paper surfaces like
|
|
14
|
+
/// book pages or folded sheets.
|
|
15
|
+
typedef NS_CLOSED_ENUM(NSUInteger, GSKCurvatureLevel) {
|
|
16
|
+
/// Distortion has almost no visible effect
|
|
17
|
+
GSKCurvatureLevelLowest,
|
|
18
|
+
/// Distortion is barely visible
|
|
19
|
+
GSKCurvatureLevelLow,
|
|
20
|
+
/// Distortion is light but visible
|
|
21
|
+
GSKCurvatureLevelMedium,
|
|
22
|
+
/// Distortion has a significant impact on the document
|
|
23
|
+
GSKCurvatureLevelHigh,
|
|
24
|
+
/// Distortion has a very strong impact on the document
|
|
25
|
+
GSKCurvatureLevelHighest,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
#endif
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Genius Scan SDK
|
|
3
|
+
//
|
|
4
|
+
// Copyright 2010-2025 The Grizzly Labs
|
|
5
|
+
//
|
|
6
|
+
// Subject to the Genius Scan SDK Licensing Agreement
|
|
7
|
+
// sdk@thegrizzlylabs.com
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
#import <Foundation/Foundation.h>
|
|
11
|
+
#import <GSSDK/GSKCurvatureLevel.h>
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
/// Type that encapsulates the result of determining a scan's curvature level.
|
|
16
|
+
@interface GSKCurvatureResult : NSObject
|
|
17
|
+
|
|
18
|
+
/// The curvature level that was determined for the scan, which indicates how distorted the document is.
|
|
19
|
+
@property (nonatomic, assign, readonly) GSKCurvatureLevel curvatureLevel NS_SWIFT_NAME(level);
|
|
20
|
+
|
|
21
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
22
|
+
- (instancetype)initWithCurvatureLevel:(GSKCurvatureLevel)curvatureLevel;
|
|
23
|
+
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
#import <GSSDK/GSKRotation.h>
|
|
12
12
|
|
|
13
|
+
@class GSKCurvatureResult;
|
|
13
14
|
@class GSKQuadrangle;
|
|
14
15
|
@class GSKFilterConfiguration;
|
|
15
16
|
@class GSKReadabilityResult;
|
|
@@ -53,6 +54,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
53
54
|
/// `isReadabilityEnabled` property set to `YES`, always `nil` otherwise.
|
|
54
55
|
@property (nonatomic, strong, nullable, readonly) GSKReadabilityResult *readabilityResult;
|
|
55
56
|
|
|
57
|
+
/// The result of determining the scan's curvature, which estimates distortion caused by non-flat paper surfaces like book pages or folded sheets.
|
|
58
|
+
/// Only assigned if the `GSKProcessingConfiguration` that was used for processing had curvature evaluation
|
|
59
|
+
/// or correction enabled, always `nil` otherwise.
|
|
60
|
+
@property (nonatomic, strong, nullable, readonly) GSKCurvatureResult *curvatureResult;
|
|
61
|
+
|
|
56
62
|
@end
|
|
57
63
|
|
|
58
64
|
NS_ASSUME_NONNULL_END
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#if 0
|
|
2
2
|
#elif defined(__arm64__) && __arm64__
|
|
3
|
-
// Generated by Apple Swift version 6.
|
|
3
|
+
// Generated by Apple Swift version 6.3.1 effective-5.10 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
|
|
4
4
|
#ifndef GSSDK_SWIFT_H
|
|
5
5
|
#define GSSDK_SWIFT_H
|
|
6
6
|
#pragma clang diagnostic push
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
#pragma clang diagnostic ignored "-Wauto-import"
|
|
27
27
|
#if defined(__OBJC__)
|
|
28
28
|
#include <Foundation/Foundation.h>
|
|
29
|
-
#endif
|
|
29
|
+
#endif // defined(__OBJC__)
|
|
30
30
|
#if defined(__cplusplus)
|
|
31
31
|
#include <cstdint>
|
|
32
32
|
#include <cstddef>
|
|
@@ -195,13 +195,32 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
195
195
|
# endif
|
|
196
196
|
#endif
|
|
197
197
|
#if !defined(SWIFT_ENUM)
|
|
198
|
-
#
|
|
199
|
-
#
|
|
200
|
-
#
|
|
198
|
+
# if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
|
|
199
|
+
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
|
200
|
+
# if __has_feature(generalized_swift_name)
|
|
201
|
+
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
|
|
202
|
+
# else
|
|
203
|
+
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
|
204
|
+
# endif
|
|
201
205
|
# else
|
|
206
|
+
# define SWIFT_ENUM(_type, _name, _extensibility) _type _name; enum
|
|
202
207
|
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
|
|
203
208
|
# endif
|
|
204
209
|
#endif
|
|
210
|
+
#if !defined(SWIFT_ENUM_TAG)
|
|
211
|
+
# if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
|
|
212
|
+
# define SWIFT_ENUM_TAG enum
|
|
213
|
+
# else
|
|
214
|
+
# define SWIFT_ENUM_TAG
|
|
215
|
+
# endif
|
|
216
|
+
#endif
|
|
217
|
+
#if !defined(SWIFT_ENUM_FWD_DECL)
|
|
218
|
+
# if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || __has_feature(objc_fixed_enum)
|
|
219
|
+
# define SWIFT_ENUM_FWD_DECL(_type, _name) enum _name : _type;
|
|
220
|
+
# else
|
|
221
|
+
# define SWIFT_ENUM_FWD_DECL(_type, _name) typedef _type _name;
|
|
222
|
+
# endif
|
|
223
|
+
#endif
|
|
205
224
|
#if !defined(SWIFT_UNAVAILABLE)
|
|
206
225
|
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
|
|
207
226
|
#endif
|
|
@@ -211,6 +230,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
211
230
|
#if !defined(SWIFT_AVAILABILITY)
|
|
212
231
|
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
|
|
213
232
|
#endif
|
|
233
|
+
#if !defined(SWIFT_AVAILABILITY_DOMAIN)
|
|
234
|
+
# define SWIFT_AVAILABILITY_DOMAIN(dom, ...) __attribute__((availability(domain: dom, __VA_ARGS__)))
|
|
235
|
+
#endif
|
|
214
236
|
#if !defined(SWIFT_WEAK_IMPORT)
|
|
215
237
|
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
|
|
216
238
|
#endif
|
|
@@ -276,6 +298,49 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
276
298
|
# define SWIFT_IMPORT_STDLIB_SYMBOL
|
|
277
299
|
#endif
|
|
278
300
|
#endif
|
|
301
|
+
#if !__has_feature(nullability)
|
|
302
|
+
# define _Nonnull
|
|
303
|
+
# define _Nullable
|
|
304
|
+
# define _Null_unspecified
|
|
305
|
+
#elif !defined(__OBJC__)
|
|
306
|
+
# pragma clang diagnostic ignored "-Wnullability-extension"
|
|
307
|
+
#endif
|
|
308
|
+
#if !__has_feature(nullability_nullable_result)
|
|
309
|
+
# define _Nullable_result _Nullable
|
|
310
|
+
#endif
|
|
311
|
+
#if __has_feature(objc_modules)
|
|
312
|
+
#if __has_warning("-Watimport-in-framework-header")
|
|
313
|
+
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
|
314
|
+
#endif
|
|
315
|
+
#endif
|
|
316
|
+
|
|
317
|
+
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
|
318
|
+
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
|
319
|
+
#if __has_warning("-Wpragma-clang-attribute")
|
|
320
|
+
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
|
|
321
|
+
#endif
|
|
322
|
+
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
|
323
|
+
#pragma clang diagnostic ignored "-Wnullability"
|
|
324
|
+
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
|
325
|
+
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
|
|
326
|
+
|
|
327
|
+
#if __has_attribute(external_source_symbol)
|
|
328
|
+
# pragma push_macro("any")
|
|
329
|
+
# undef any
|
|
330
|
+
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="GSSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
|
|
331
|
+
# pragma pop_macro("any")
|
|
332
|
+
#endif
|
|
333
|
+
|
|
334
|
+
#if defined(__cplusplus)
|
|
335
|
+
extern "C" {
|
|
336
|
+
#endif
|
|
337
|
+
|
|
338
|
+
#if defined(__cplusplus)
|
|
339
|
+
} // extern "C"
|
|
340
|
+
#endif
|
|
341
|
+
#if __has_attribute(external_source_symbol)
|
|
342
|
+
# pragma clang attribute pop
|
|
343
|
+
#endif
|
|
279
344
|
#if defined(__OBJC__)
|
|
280
345
|
#if __has_feature(objc_modules)
|
|
281
346
|
#if __has_warning("-Watimport-in-framework-header")
|
|
@@ -290,7 +355,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
290
355
|
|
|
291
356
|
#import <GSSDK/GSSDK.h>
|
|
292
357
|
|
|
293
|
-
#endif
|
|
358
|
+
#endif // defined(__OBJC__)
|
|
294
359
|
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
|
295
360
|
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
|
296
361
|
#if __has_warning("-Wpragma-clang-attribute")
|
|
@@ -777,7 +842,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
|
|
|
777
842
|
- (BOOL)generate:(GSKPDFDocument * _Nonnull)document configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
|
|
778
843
|
@end
|
|
779
844
|
|
|
780
|
-
|
|
845
|
+
SWIFT_ENUM_FWD_DECL(NSInteger, GSKDocumentGeneratorFileFormat)
|
|
781
846
|
@class GSKDocumentGeneratorDebugConfiguration;
|
|
782
847
|
/// A configuration for the document generator.
|
|
783
848
|
SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
|
|
@@ -1076,7 +1141,7 @@ typedef SWIFT_ENUM(NSInteger, GSKFlashStatus, open) {
|
|
|
1076
1141
|
GSKFlashStatusOff = 2,
|
|
1077
1142
|
};
|
|
1078
1143
|
|
|
1079
|
-
|
|
1144
|
+
SWIFT_ENUM_FWD_DECL(NSInteger, GSKIntegrationFramework)
|
|
1080
1145
|
SWIFT_CLASS_NAMED("GSKIntegrationContext")
|
|
1081
1146
|
@interface GSKIntegrationContext : NSObject
|
|
1082
1147
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) enum GSKIntegrationFramework currentFramework;)
|
|
@@ -1259,13 +1324,13 @@ SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
|
|
|
1259
1324
|
- (void)startFromViewController:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
|
|
1260
1325
|
@end
|
|
1261
1326
|
|
|
1262
|
-
|
|
1327
|
+
SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowSource)
|
|
1263
1328
|
@class NSURL;
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1329
|
+
SWIFT_ENUM_FWD_DECL(NSInteger, GSKScanOrientation)
|
|
1330
|
+
SWIFT_ENUM_FWD_DECL(NSInteger, GSKScanFlowFilterType)
|
|
1331
|
+
SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowPDFPageSize)
|
|
1332
|
+
SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowFlashMode)
|
|
1333
|
+
SWIFT_ENUM_FWD_DECL(NSUInteger, GSKScanFlowMultiPageFormat)
|
|
1269
1334
|
@class GSKScanFlowOCRConfiguration;
|
|
1270
1335
|
/// Enables configuration of a <code>GSKScanFlow</code> instance.
|
|
1271
1336
|
/// Pass an instance of this class to the initializer of <code>GSKScanFlow</code>
|
|
@@ -1357,6 +1422,15 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
1357
1422
|
@end
|
|
1358
1423
|
|
|
1359
1424
|
/// Enum that defines various numeric error codes that can occur during a scan flow.
|
|
1425
|
+
/// Cross-platform plugins expose the matching string code as the <code>code</code> field in their structured error payloads.
|
|
1426
|
+
/// | String code | Description | Suggested handling |
|
|
1427
|
+
/// | — | — | — |
|
|
1428
|
+
/// | <code>cancellation_error</code> | The user canceled the document or barcode scan flow. | Treat as a normal exit; do not show an error. |
|
|
1429
|
+
/// | <code>configuration_error</code> | The configuration or input parameters are invalid. | Fix the configuration before retrying. |
|
|
1430
|
+
/// | <code>licensing_error</code> | The license key is invalid, expired, or not initialized. | Verify the license key and contact support if needed. |
|
|
1431
|
+
/// | <code>capture_error</code> | The camera or capture session failed. | Let the user retry; restart the device if the problem persists. |
|
|
1432
|
+
/// | <code>storage_space_error</code> | There is not enough storage space to write generated files. | Ask the user to free up storage space and retry. |
|
|
1433
|
+
/// | <code>internal_error</code> | An unexpected SDK error occurred. | Show a generic error and collect the underlying error for diagnostics. |
|
|
1360
1434
|
typedef SWIFT_ENUM(NSInteger, GSKScanFlowErrorCode, open) {
|
|
1361
1435
|
/// User has canceled the scan flow
|
|
1362
1436
|
GSKScanFlowCancellationErrorCode SWIFT_COMPILE_NAME("cancellation") = 999,
|
|
@@ -1713,7 +1787,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
|
|
|
1713
1787
|
@property (nonatomic, readonly) UIInterfaceOrientationMask gsk_supportedInterfaceOrientations;
|
|
1714
1788
|
@end
|
|
1715
1789
|
|
|
1716
|
-
#endif
|
|
1790
|
+
#endif // defined(__OBJC__)
|
|
1717
1791
|
#if __has_attribute(external_source_symbol)
|
|
1718
1792
|
# pragma clang attribute pop
|
|
1719
1793
|
#endif
|
|
@@ -13,6 +13,8 @@ FOUNDATION_EXPORT const unsigned char GSSDKVersionString[];
|
|
|
13
13
|
|
|
14
14
|
#import <GSSDK/GSKBackgroundKind.h>
|
|
15
15
|
#import <GSSDK/GSKCurvatureCorrectionConfiguration.h>
|
|
16
|
+
#import <GSSDK/GSKCurvatureLevel.h>
|
|
17
|
+
#import <GSSDK/GSKCurvatureResult.h>
|
|
16
18
|
#import <GSSDK/GSKDefaultLogLevel.h>
|
|
17
19
|
#import <GSSDK/GSKDefaultLogger.h>
|
|
18
20
|
#import <GSSDK/GSKDocumentComposition.h>
|
|
Binary file
|