@thegrizzlylabs/cordova-plugin-genius-scan 5.11.0 → 5.12.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 +1 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKView.h +5 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +213 -20
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +2657 -680
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +74 -11
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +74 -11
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/png.h +307 -227
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pngconf.h +47 -54
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pnglibconf.h +17 -2
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/he.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/dSYMs/GSSDK.framework.dSYM/Contents/Info.plist +2 -2
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/dSYMs/GSSDK.framework.dSYM/Contents/Resources/DWARF/GSSDK +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64/dSYMs/GSSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/GSSDK.yml +4019 -3735
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKView.h +5 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +426 -40
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +2657 -680
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +74 -11
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +74 -11
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +2657 -680
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +74 -11
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +74 -11
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/png.h +307 -227
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/pngconf.h +47 -54
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/pnglibconf.h +17 -2
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/he.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/GSSDK.framework.dSYM/Contents/Info.plist +2 -2
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/GSSDK.framework.dSYM/Contents/Resources/DWARF/GSSDK +0 -0
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/GSSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/GSSDK.yml +4540 -4258
- package/src/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/GSSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/GSSDK.yml +4476 -4195
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ The method `scanWithConfiguration` takes a `configuration` parameter which can t
|
|
|
122
122
|
- `pdfMaxScanDimension`: max dimension in pixels when images are scaled before PDF generation, for example 2000 to fit both height and width within 2000px. Defaults to 0, which means no scaling is performed.
|
|
123
123
|
- `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.
|
|
124
124
|
- `jpegQuality`: JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality. Default is 60.
|
|
125
|
+
- `skipPostProcessingScreen`: Whether to skip showing the post-processing screen. We only recommend enabling this option when scanning structured data. Generally, you want the user to visually confirm the quality of each scan.
|
|
125
126
|
- `postProcessingActions`: an array with the desired actions to display during the post processing screen (defaults to all actions). Possible actions are `rotate`, `editFilter` and `correctDistortion`.
|
|
126
127
|
- `defaultCurvatureCorrection`: `enabled` or `disabled` whether a curvature correction should be applied by default. Disabled by default.
|
|
127
128
|
- `defaultScanOrientation`: `automatic` to rotate scan automatically after capture or `original` to keep original scan orientation (defaults to `automatic`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thegrizzlylabs/cordova-plugin-genius-scan",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.0",
|
|
4
4
|
"description": "Cordova Plugin for Genius Scan SDK",
|
|
5
5
|
"author": "TheGrizzlyLabs <sdk@thegrizzlylabs.com> (https://www.thegrizzlylabs.com/)",
|
|
6
6
|
"homepage": "https://geniusscansdk.com/",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<plugin id="@thegrizzlylabs/cordova-plugin-genius-scan" version="5.
|
|
2
|
+
<plugin id="@thegrizzlylabs/cordova-plugin-genius-scan" version="5.12.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
<name>Genius Scan</name>
|
|
4
4
|
<js-module name="GeniusScan" src="www/GeniusScan.js">
|
|
5
5
|
<clobbers target="cordova.plugins.GeniusScan" />
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<config-file parent="/manifest/application" target="AndroidManifest.xml" />
|
|
14
14
|
<source-file src="src/android/GeniusScan.java" target-dir="src/com/geniusscansdk/cordova" />
|
|
15
15
|
<framework custom="true" src="src/android/build.gradle" type="gradleReference" />
|
|
16
|
-
<framework src="com.geniusscansdk:gssdk:5.
|
|
16
|
+
<framework src="com.geniusscansdk:gssdk:5.12.0"/>
|
|
17
17
|
</platform>
|
|
18
18
|
|
|
19
19
|
<platform name="ios">
|
|
@@ -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
|
|
@@ -48,6 +48,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
48
48
|
*/
|
|
49
49
|
- (void)resumePreview;
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
Returns the metadata output rect converted to the preview layer's coordinates.
|
|
53
|
+
*/
|
|
54
|
+
- (CGRect)layerRectConvertedFromMetadataOutputRect:(CGRect)rect;
|
|
55
|
+
|
|
51
56
|
@property (nonatomic, readonly) UIView *previewView;
|
|
52
57
|
|
|
53
58
|
/**
|
|
@@ -372,11 +372,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDu
|
|
|
372
372
|
/// The flash mode. Default is .auto.
|
|
373
373
|
@property (nonatomic) enum GSKCameraSessionFlashStatus flashStatus;
|
|
374
374
|
/// Returns the current status of the document detection.
|
|
375
|
-
///
|
|
376
|
-
/// active document detection is <code>.none</code> while taking the photo, or when the session is paused, even if the requested
|
|
377
|
-
/// detection is <code>.highlightAndTrigger</code>.
|
|
375
|
+
/// This is a computed property that maps to the new activeDetectionMode property for backward compatibility.
|
|
378
376
|
/// Observable.
|
|
379
|
-
|
|
377
|
+
/// important:
|
|
378
|
+
/// This property is deprecated. Use <code>activeDetectionMode</code> instead, which supports both document and readable
|
|
379
|
+
/// code detection modes.
|
|
380
|
+
@property (nonatomic) enum GSKCameraSessionDocumentDetection activeDocumentDetection SWIFT_DEPRECATED_MSG("Use activeDetectionMode instead");
|
|
380
381
|
/// True for the duration of taking the photo and processing it. Observable.
|
|
381
382
|
@property (nonatomic, readonly) BOOL isTakingPhoto;
|
|
382
383
|
/// Returns false if flash isn’t supported on this device configuration.
|
|
@@ -391,6 +392,14 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDu
|
|
|
391
392
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
392
393
|
@end
|
|
393
394
|
|
|
395
|
+
@class AVCaptureMetadataOutput;
|
|
396
|
+
@class AVMetadataObject;
|
|
397
|
+
@class AVCaptureConnection;
|
|
398
|
+
|
|
399
|
+
@interface GSKCameraSession (SWIFT_EXTENSION(GSSDK)) <AVCaptureMetadataOutputObjectsDelegate>
|
|
400
|
+
- (void)captureOutput:(AVCaptureMetadataOutput * _Nonnull)output didOutputMetadataObjects:(NSArray<AVMetadataObject *> * _Nonnull)metadataObjects fromConnection:(AVCaptureConnection * _Nonnull)connection;
|
|
401
|
+
@end
|
|
402
|
+
|
|
394
403
|
|
|
395
404
|
|
|
396
405
|
|
|
@@ -425,10 +434,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDu
|
|
|
425
434
|
/// The configuration for a camera session.
|
|
426
435
|
SWIFT_CLASS("_TtC5GSSDK29GSKCameraSessionConfiguration")
|
|
427
436
|
@interface GSKCameraSessionConfiguration : NSObject
|
|
437
|
+
/// note:
|
|
438
|
+
/// Deprecated in favor of <code>init(detectionMode:)</code> which allows for more flexible detection modes.
|
|
428
439
|
/// \param documentDetection The type of real-time document detection to apply.
|
|
429
440
|
///
|
|
430
|
-
- (nonnull instancetype)initWithDocumentDetection:(enum GSKCameraSessionDocumentDetection)documentDetection OBJC_DESIGNATED_INITIALIZER;
|
|
431
|
-
/// A session configuration where the document detection is <code>.
|
|
441
|
+
- (nonnull instancetype)initWithDocumentDetection:(enum GSKCameraSessionDocumentDetection)documentDetection OBJC_DESIGNATED_INITIALIZER SWIFT_DEPRECATED_MSG("Use init(detectionMode:) instead");
|
|
442
|
+
/// A session configuration where the document detection is <code>.highlightAndAutoCapture</code>
|
|
432
443
|
- (nonnull instancetype)init;
|
|
433
444
|
@end
|
|
434
445
|
|
|
@@ -488,12 +499,12 @@ SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
|
|
|
488
499
|
@end
|
|
489
500
|
|
|
490
501
|
|
|
491
|
-
|
|
492
502
|
@interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
|
|
493
503
|
/// Snap the photo
|
|
494
504
|
- (void)takePhoto;
|
|
495
505
|
@end
|
|
496
506
|
|
|
507
|
+
|
|
497
508
|
@class GSKScan;
|
|
498
509
|
@class GSKQuadrangle;
|
|
499
510
|
|
|
@@ -561,6 +572,8 @@ enum GSKDocumentGeneratorFileFormat : NSInteger;
|
|
|
561
572
|
/// A configuration for the document generator.
|
|
562
573
|
SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
|
|
563
574
|
@interface GSKDocumentGeneratorConfiguration : NSObject
|
|
575
|
+
+ (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
|
|
576
|
+
+ (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
|
|
564
577
|
/// The output file format of the document generator. Must be .pdf or .tif.
|
|
565
578
|
@property (nonatomic, readonly) enum GSKDocumentGeneratorFileFormat outputFileFormat;
|
|
566
579
|
/// The path where the generated document will be written. The extension will not be validated.
|
|
@@ -575,8 +588,6 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
|
|
|
575
588
|
/// Don’t use this in production. Default is nil.
|
|
576
589
|
@property (nonatomic, readonly, strong) GSKDocumentGeneratorDebugConfiguration * _Nullable debugConfiguration;
|
|
577
590
|
- (nonnull instancetype)initWithOutputFileFormat:(enum GSKDocumentGeneratorFileFormat)outputFileFormat outputFilePath:(NSString * _Nonnull)outputFilePath pdfFontFilePath:(NSString * _Nullable)pdfFontFilePath shouldGeneratePDFA:(BOOL)shouldGeneratePDFA debugConfiguration:(GSKDocumentGeneratorDebugConfiguration * _Nullable)debugConfiguration OBJC_DESIGNATED_INITIALIZER;
|
|
578
|
-
+ (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
|
|
579
|
-
+ (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
|
|
580
591
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
581
592
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
582
593
|
@end
|
|
@@ -670,8 +681,8 @@ SWIFT_CLASS("_TtC5GSSDK40GSKFilterBackgroundCleaningConfiguration")
|
|
|
670
681
|
|
|
671
682
|
|
|
672
683
|
@interface GSKFilterBackgroundCleaningConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
673
|
-
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
674
684
|
@property (nonatomic, readonly) NSUInteger hash;
|
|
685
|
+
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
675
686
|
@end
|
|
676
687
|
|
|
677
688
|
|
|
@@ -701,8 +712,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterCol
|
|
|
701
712
|
|
|
702
713
|
|
|
703
714
|
@interface GSKFilterColorConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
704
|
-
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
705
715
|
@property (nonatomic, readonly) NSUInteger hash;
|
|
716
|
+
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
706
717
|
@end
|
|
707
718
|
|
|
708
719
|
@class GSKFilterLightingCorrectionConfiguration;
|
|
@@ -718,6 +729,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterCon
|
|
|
718
729
|
/// \param colorConfiguration an optional color configuration. If nil, the color configuration is used.
|
|
719
730
|
///
|
|
720
731
|
+ (GSKFilterConfiguration * _Nonnull)photoWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
|
|
732
|
+
+ (GSKFilterConfiguration * _Nonnull)configurationWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
|
|
721
733
|
/// The lighting configuration
|
|
722
734
|
/// Determines the parameters to tune the image levels, contrast.
|
|
723
735
|
@property (nonatomic, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nullable lightingCorrectionConfiguration;
|
|
@@ -727,7 +739,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterCon
|
|
|
727
739
|
/// The color configuration
|
|
728
740
|
/// Determines the filter’s output colors.
|
|
729
741
|
@property (nonatomic, readonly, strong) GSKFilterColorConfiguration * _Nullable colorConfiguration;
|
|
730
|
-
+ (GSKFilterConfiguration * _Nonnull)configurationWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
|
|
731
742
|
/// A filter configuration.
|
|
732
743
|
/// \param lightingCorrectionConfiguration an optional lighting correction configuration. If nil, no correction is applied.
|
|
733
744
|
///
|
|
@@ -743,8 +754,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterCon
|
|
|
743
754
|
|
|
744
755
|
|
|
745
756
|
@interface GSKFilterConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
746
|
-
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
747
757
|
@property (nonatomic, readonly) NSUInteger hash;
|
|
758
|
+
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
748
759
|
@end
|
|
749
760
|
|
|
750
761
|
|
|
@@ -807,8 +818,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLig
|
|
|
807
818
|
|
|
808
819
|
|
|
809
820
|
@interface GSKFilterLightingCorrectionConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
810
|
-
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
811
821
|
@property (nonatomic, readonly) NSUInteger hash;
|
|
822
|
+
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
|
|
812
823
|
@end
|
|
813
824
|
|
|
814
825
|
|
|
@@ -931,6 +942,188 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
|
|
|
931
942
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
932
943
|
@end
|
|
933
944
|
|
|
945
|
+
@class GSKReadableCodeFlowConfiguration;
|
|
946
|
+
@class GSKReadableCodeFlowResult;
|
|
947
|
+
|
|
948
|
+
/// A flow for scanning readable codes (barcodes, QR codes, etc.)
|
|
949
|
+
SWIFT_CLASS("_TtC5GSSDK19GSKReadableCodeFlow")
|
|
950
|
+
@interface GSKReadableCodeFlow : NSObject
|
|
951
|
+
/// Initializes a new readable code flow
|
|
952
|
+
/// \param configuration Configuration for the readable code scanning
|
|
953
|
+
///
|
|
954
|
+
- (nonnull instancetype)initWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
|
|
955
|
+
/// Starts the readable code scanning flow by presenting a full-screen camera interface.
|
|
956
|
+
/// This method presents a camera view controller that continuously scans for barcodes and QR codes.
|
|
957
|
+
/// The scanning process respects the code types specified in the flow’s configuration.
|
|
958
|
+
/// The method uses Swift’s async/await pattern, suspending until either:
|
|
959
|
+
/// <ul>
|
|
960
|
+
/// <li>
|
|
961
|
+
/// A readable code is successfully detected (except in batch mode)
|
|
962
|
+
/// </li>
|
|
963
|
+
/// <li>
|
|
964
|
+
/// The user taps the done button (batch mode)
|
|
965
|
+
/// </li>
|
|
966
|
+
/// <li>
|
|
967
|
+
/// The user cancels the operation
|
|
968
|
+
/// </li>
|
|
969
|
+
/// <li>
|
|
970
|
+
/// An error occurs during setup or scanning
|
|
971
|
+
/// </li>
|
|
972
|
+
/// </ul>
|
|
973
|
+
/// The behavior varies based on the configuration’s isBatchModeEnabled:
|
|
974
|
+
/// <ul>
|
|
975
|
+
/// <li>
|
|
976
|
+
/// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
|
|
977
|
+
/// </li>
|
|
978
|
+
/// <li>
|
|
979
|
+
/// <code>true</code>: Collects unique codes over time until the user taps the done button
|
|
980
|
+
/// </li>
|
|
981
|
+
/// </ul>
|
|
982
|
+
/// Example usage:
|
|
983
|
+
/// \code
|
|
984
|
+
/// let flow = GSKReadableCodeFlow()
|
|
985
|
+
/// do {
|
|
986
|
+
/// let result = try await flow.resultByStarting(fromViewController: self)
|
|
987
|
+
/// print("Scanned codes: \(result.readableCodes.map { $0.value })")
|
|
988
|
+
/// } catch GSKReadableCodeFlowError.userCancellation {
|
|
989
|
+
/// print("User canceled scanning")
|
|
990
|
+
/// } catch {
|
|
991
|
+
/// print("Scanning failed: \(error)")
|
|
992
|
+
/// }
|
|
993
|
+
///
|
|
994
|
+
/// \endcodeimportant:
|
|
995
|
+
/// This method requires camera permissions. Ensure your app’s Info.plist includes
|
|
996
|
+
/// the <code>NSCameraUsageDescription</code> key with an appropriate description.
|
|
997
|
+
/// note:
|
|
998
|
+
/// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
|
|
999
|
+
/// for an immersive scanning experience.
|
|
1000
|
+
/// \param viewController The view controller from which to present the camera interface.
|
|
1001
|
+
/// This should typically be the currently visible view controller.
|
|
1002
|
+
///
|
|
1003
|
+
///
|
|
1004
|
+
/// throws:
|
|
1005
|
+
///
|
|
1006
|
+
/// <ul>
|
|
1007
|
+
/// <li>
|
|
1008
|
+
/// Typically throws a <code>GSKReadableCodeFlowError</code>
|
|
1009
|
+
/// </li>
|
|
1010
|
+
/// </ul>
|
|
1011
|
+
///
|
|
1012
|
+
/// returns:
|
|
1013
|
+
/// A <code>GSKReadableCodeFlowResult</code> containing the detected readable codes with their
|
|
1014
|
+
/// decoded values and format types.
|
|
1015
|
+
- (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nullable, NSError * _Nullable))completionHandler;
|
|
1016
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1017
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1018
|
+
@end
|
|
1019
|
+
|
|
1020
|
+
@class NSError;
|
|
1021
|
+
|
|
1022
|
+
@interface GSKReadableCodeFlow (SWIFT_EXTENSION(GSSDK))
|
|
1023
|
+
/// Instantiates a <code>GSKReadableCodeFlow</code> instance with the provided configuration.
|
|
1024
|
+
/// This initializer is only available from Objective-C.
|
|
1025
|
+
+ (nonnull instancetype)readableCodeFlowWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
|
|
1026
|
+
/// Starts the readable code scanning flow.
|
|
1027
|
+
/// @param viewController The view controller to present the readable code scanning interface from.
|
|
1028
|
+
/// @param successBlock A completion block/closure that will be called on the main
|
|
1029
|
+
/// thread upon successful completion of the scan flow. It receives a <code>GSKReadableCodeFlowResult</code> object as
|
|
1030
|
+
/// a parameter. This object gives you access to the scanned codes.
|
|
1031
|
+
/// @param failureBlock A block/closure called if an error was encountered.
|
|
1032
|
+
/// This method is only available from Objective-C.
|
|
1033
|
+
- (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
|
|
1034
|
+
@end
|
|
1035
|
+
|
|
1036
|
+
@class UIColor;
|
|
1037
|
+
|
|
1038
|
+
/// Configuration for the UI readable code scanning flow
|
|
1039
|
+
/// This class allows customization of which barcode and QR code formats should be detected
|
|
1040
|
+
/// during the scanning process. By default, all supported formats are enabled.
|
|
1041
|
+
SWIFT_CLASS("_TtC5GSSDK32GSKReadableCodeFlowConfiguration")
|
|
1042
|
+
@interface GSKReadableCodeFlowConfiguration : NSObject
|
|
1043
|
+
/// Whether batch mode is enabled for code detection.
|
|
1044
|
+
/// This setting controls how codes are detected and when they are returned:
|
|
1045
|
+
/// <ul>
|
|
1046
|
+
/// <li>
|
|
1047
|
+
/// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
|
|
1048
|
+
/// </li>
|
|
1049
|
+
/// <li>
|
|
1050
|
+
/// <code>true</code>: Collect multiple codes over time before returning when user taps Done
|
|
1051
|
+
/// </li>
|
|
1052
|
+
/// </ul>
|
|
1053
|
+
/// Example:
|
|
1054
|
+
/// \code
|
|
1055
|
+
/// // Standard mode - return codes immediately (default)
|
|
1056
|
+
/// let standardConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: false)
|
|
1057
|
+
///
|
|
1058
|
+
/// // Batch mode - collect codes over time
|
|
1059
|
+
/// let batchConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: true)
|
|
1060
|
+
///
|
|
1061
|
+
/// \endcode
|
|
1062
|
+
@property (nonatomic) BOOL isBatchModeEnabled;
|
|
1063
|
+
/// The highlight color used for the UI (overlay). Defaults
|
|
1064
|
+
/// to <code>.green</code>. For good constrast, we recommend using a bright color.
|
|
1065
|
+
@property (nonatomic, strong) UIColor * _Nonnull highlightColor;
|
|
1066
|
+
/// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
|
|
1067
|
+
/// default color will be used (blue on iOS, for example).
|
|
1068
|
+
@property (nonatomic, strong) UIColor * _Nullable menuColor;
|
|
1069
|
+
/// Creates a new readable code flow configuration with default values
|
|
1070
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1071
|
+
@end
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
@interface GSKReadableCodeFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
1075
|
+
/// Create a configuration from a dictionary.
|
|
1076
|
+
/// This is used for interfacing with cross-platform plugins but shouldn’t
|
|
1077
|
+
/// be used in native projects.
|
|
1078
|
+
+ (GSKReadableCodeFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
|
|
1079
|
+
@end
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
/// Enum that defines various errors that can occur during a readable code flow.
|
|
1085
|
+
typedef SWIFT_ENUM(NSInteger, GSKReadableCodeFlowError, open) {
|
|
1086
|
+
/// User has canceled the readable code flow
|
|
1087
|
+
GSKReadableCodeFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 0,
|
|
1088
|
+
/// A general error due to a bad configuration parameter
|
|
1089
|
+
GSKReadableCodeFlowConfigurationError SWIFT_COMPILE_NAME("configuration") = 1,
|
|
1090
|
+
/// Camera permission was denied
|
|
1091
|
+
GSKReadableCodeFlowPermissionDeniedError SWIFT_COMPILE_NAME("permissionDenied") = 2,
|
|
1092
|
+
/// Failed to initialize the barcode detector
|
|
1093
|
+
GSKReadableCodeFlowDetectorError SWIFT_COMPILE_NAME("detectorError") = 3,
|
|
1094
|
+
};
|
|
1095
|
+
static NSString * _Nonnull const GSKReadableCodeFlowErrorDomain = @"GSSDK.GSKReadableCodeFlowError";
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
/// The result of a readable code scanning flow
|
|
1099
|
+
/// This class encapsulates the successful outcome of a readable code scanning session,
|
|
1100
|
+
/// containing the detected barcode or QR code data.
|
|
1101
|
+
SWIFT_CLASS("_TtC5GSSDK25GSKReadableCodeFlowResult")
|
|
1102
|
+
@interface GSKReadableCodeFlowResult : NSObject
|
|
1103
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1104
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1105
|
+
@end
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
@interface GSKReadableCodeFlowResult (SWIFT_EXTENSION(GSSDK))
|
|
1109
|
+
/// Returns a dictionary representation of the result
|
|
1110
|
+
/// The dictionary contains:
|
|
1111
|
+
/// <ul>
|
|
1112
|
+
/// <li>
|
|
1113
|
+
/// readableCodes: An array of code dictionaries, each containing:
|
|
1114
|
+
/// <ul>
|
|
1115
|
+
/// <li>
|
|
1116
|
+
/// value: The decoded string value
|
|
1117
|
+
/// </li>
|
|
1118
|
+
/// <li>
|
|
1119
|
+
/// type: The code type as a string (e.g., “qr”, “code128”)
|
|
1120
|
+
/// </li>
|
|
1121
|
+
/// </ul>
|
|
1122
|
+
/// </li>
|
|
1123
|
+
/// </ul>
|
|
1124
|
+
@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
|
|
1125
|
+
@end
|
|
1126
|
+
|
|
934
1127
|
typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
|
|
935
1128
|
GSKReceiptCategoryGas = 0,
|
|
936
1129
|
GSKReceiptCategoryTransportation = 1,
|
|
@@ -984,7 +1177,6 @@ enum GSKScanFlowFilterType : NSInteger;
|
|
|
984
1177
|
enum GSKScanFlowPDFPageSize : NSUInteger;
|
|
985
1178
|
enum GSKScanFlowFlashMode : NSUInteger;
|
|
986
1179
|
enum GSKScanFlowMultiPageFormat : NSUInteger;
|
|
987
|
-
@class UIColor;
|
|
988
1180
|
@class GSKScanFlowOCRConfiguration;
|
|
989
1181
|
|
|
990
1182
|
/// Enables configuration of a <code>GSKScanFlow</code> instance.
|
|
@@ -1062,20 +1254,20 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
1062
1254
|
@end
|
|
1063
1255
|
|
|
1064
1256
|
|
|
1257
|
+
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
1258
|
+
- (BOOL)validate:(NSError * _Nullable * _Nullable)error;
|
|
1259
|
+
@end
|
|
1260
|
+
|
|
1065
1261
|
|
|
1066
1262
|
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
1067
1263
|
/// Create a configuration from a dictionary.
|
|
1068
|
-
/// This is
|
|
1264
|
+
/// This is used for interfacing with cross-platform plugins but shouldn’t
|
|
1069
1265
|
/// be used in native projects.
|
|
1070
1266
|
+ (nullable instancetype)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
|
|
1071
1267
|
@end
|
|
1072
1268
|
|
|
1073
1269
|
|
|
1074
1270
|
|
|
1075
|
-
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
1076
|
-
- (BOOL)validate:(NSError * _Nullable * _Nullable)error;
|
|
1077
|
-
@end
|
|
1078
|
-
|
|
1079
1271
|
/// Enum that defines various errors that can occur during a scan flow.
|
|
1080
1272
|
typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
|
|
1081
1273
|
/// User has canceled the scan flow
|
|
@@ -1451,6 +1643,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
|
|
|
1451
1643
|
|
|
1452
1644
|
|
|
1453
1645
|
|
|
1646
|
+
|
|
1454
1647
|
@interface UIViewController (SWIFT_EXTENSION(GSSDK))
|
|
1455
1648
|
/// Return a status bar style appropriate for this view controller
|
|
1456
1649
|
/// based on the contrast between the status bar’s contents and the
|
|
Binary file
|