@thegrizzlylabs/react-native-genius-scan 6.1.0 → 6.3.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.
Files changed (71) hide show
  1. package/README.md +7 -4
  2. package/android/build.gradle +1 -1
  3. package/index.d.ts +23 -1
  4. package/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -9
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentDetector.h +21 -0
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +35 -7
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +2063 -173
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +64 -24
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +64 -24
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.strings +0 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/he.lproj/GSSDK.strings +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  38. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +21 -0
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +70 -14
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +2063 -173
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +64 -24
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  44. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +64 -24
  45. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +2063 -173
  46. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +64 -24
  47. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  48. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +64 -24
  49. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  50. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
  51. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
  52. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
  53. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  54. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.strings +0 -0
  55. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  56. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/he.lproj/GSSDK.strings +0 -0
  57. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
  58. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
  59. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
  60. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
  61. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
  62. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
  63. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
  64. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
  65. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
  66. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
  67. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
  68. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
  69. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
  70. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
  71. package/package.json +1 -1
package/README.md CHANGED
@@ -86,24 +86,26 @@ RNGeniusScan.setLicenseKey(licenseKey, /* autoRefresh = */ true)
86
86
  ### Start the scanner module
87
87
 
88
88
  ```javascript
89
- val result = await RNGeniusScan.scanWithConfiguration(configuration)
89
+ const result = await RNGeniusScan.scanWithConfiguration(configuration)
90
90
  ```
91
91
 
92
92
  The method `scanWithConfiguration` takes a `configuration` parameter which can take the following options:
93
93
 
94
94
  - `source`: `camera`, `image` or `library` (defaults to camera)
95
- - `sourceImageUrl`: an absolute image url, required if `source` is `image`. Example: `file:///var/…/image.png`
95
+ - `sourceImageUrl`: an absolute image url, required if `source` is `image`. Example: `file:///path/to/image.png`
96
96
  - `multiPage`: boolean (defaults to true). If true, after a page is scanned, a prompt to scan another page will be displayed. If false, a single page will be scanned.
97
97
  - `multiPageFormat`: `pdf`, `tiff`, `none` (defaults to `pdf`)
98
98
  - `defaultFilter`: the filter that will be applied by default to enhance scans, or `none` if no enhancement should be performed by default. Possible values are listed in the [Available filters section](#available-filters). Default value is `automatic`.
99
99
  - `availableFilters`: an array of filters that the user can select when they tap on the edit filter button. Defaults to [`none`, `automatic`, `automaticMonochrome`, `automaticBlackAndWhite`, `automaticColor`, `photo`].
100
100
  - `pdfPageSize`: `fit`, `a4`, `letter`, defaults to fit.
101
+ - `pdfPassword`: Optional password used to protect generated PDF documents. Empty passwords are treated as no password. This only applies when `multiPageFormat` is `pdf`.
101
102
  - `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.
102
103
  - `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.
103
104
  - `jpegQuality`: JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality. Default is 60.
104
105
  - `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.
105
106
  - `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`.
106
107
  - `defaultCurvatureCorrection`: `enabled` or `disabled` whether a curvature correction should be applied by default. Disabled by default.
108
+ - `showCropValidation`: `never`, `always`, or `{ whenConfidenceBelowOrEqual: 'highest' | 'high' | 'medium' | 'low' | 'lowest' }` to automatically show crop validation after capture.
107
109
  - `defaultScanOrientation`: `automatic` to rotate scan automatically after capture or `original` to keep original scan orientation (defaults to `automatic`).
108
110
  - `photoLibraryButtonHidden`: boolean specifying whether the button allowing the user to pick an image on the Camera screen should be hidden (default to false).
109
111
  - `flashButtonHidden`: boolean (default to false)
@@ -111,13 +113,14 @@ The method `scanWithConfiguration` takes a `configuration` parameter which can t
111
113
  - `foregroundColor`: string representing a color, must start with a `#`. The color of the icons, text (defaults to '#ffffff').
112
114
  - `backgroundColor`: string representing a color, must start with a `#`. The color of the toolbar, screen background (defaults to black)
113
115
  - `highlightColor`: string representing a color, must start with a `#`. The color of the image overlays (default to blue)
114
- - `menuColor`: string representing a color, must start with a `#`. The color of the menus (defaults to system defaults.)
116
+ - `menuColor`: string representing a color, must start with a `#`. The color of the menus (iOS only, defaults to system defaults).
115
117
  - `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
118
  - `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
119
  - `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
120
  - `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).
121
+ - `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 17+ only).
120
122
  - `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).
123
+ - `showFinalReview`: boolean specifying whether the final review screen should be displayed before submission (default to false).
121
124
 
122
125
  It returns a promise with `result` object containing:
123
126
 
@@ -42,5 +42,5 @@ rootProject.allprojects {
42
42
 
43
43
  dependencies {
44
44
  implementation 'com.facebook.react:react-native:+'
45
- implementation 'com.geniusscansdk:gssdk:6.1.0'
45
+ implementation 'com.geniusscansdk:gssdk:6.3.0'
46
46
  }
package/index.d.ts CHANGED
@@ -1,3 +1,18 @@
1
+ export type ScanOrientation = 'automatic' | 'original';
2
+
3
+ export type CurvatureCorrectionMode = 'enabled' | 'disabled';
4
+
5
+ export type ReadabilityLevel = 'lowest' | 'low' | 'medium' | 'high' | 'highest';
6
+
7
+ export type CropConfidenceLevel = 'lowest' | 'low' | 'medium' | 'high' | 'highest';
8
+
9
+ export type CropValidation =
10
+ | 'never'
11
+ | 'always'
12
+ | {
13
+ whenConfidenceBelowOrEqual: CropConfidenceLevel;
14
+ };
15
+
1
16
  export interface ScanOptions {
2
17
  source?: 'camera' | 'library' | 'image';
3
18
  sourceImageUrl?: string;
@@ -5,7 +20,11 @@ export interface ScanOptions {
5
20
  defaultFilter?: string;
6
21
  availableFilters?: string[];
7
22
  pdfPageSize?: 'fit' | 'a4' | 'letter';
23
+ skipPostProcessingScreen?: boolean;
8
24
  postProcessingActions?: string[];
25
+ defaultCurvatureCorrection?: CurvatureCorrectionMode;
26
+ defaultScanOrientation?: ScanOrientation;
27
+ photoLibraryButtonHidden?: boolean;
9
28
  flashButtonHidden?: boolean;
10
29
  defaultFlashMode?: 'auto' | 'on' | 'off';
11
30
  backgroundColor?: string;
@@ -18,10 +37,14 @@ export interface ScanOptions {
18
37
  };
19
38
  structuredData?: string[];
20
39
  structuredDataBarcodeTypes?: string[];
40
+ requiredReadabilityLevel?: ReadabilityLevel;
41
+ showCropValidation?: CropValidation;
21
42
  jpegQuality?: number;
22
43
  pdfMaxScanDimension?: number;
23
44
  multiPageFormat?: 'none' | 'pdf' | 'tiff';
45
+ pdfPassword?: string;
24
46
  pdfFontFileUrl?: string;
47
+ showFinalReview?: boolean;
25
48
  }
26
49
 
27
50
  export interface BarcodeConfiguration {
@@ -40,7 +63,6 @@ export interface Scan {
40
63
  }
41
64
 
42
65
  export interface ScanResult {
43
- pdfURL?: string;
44
66
  multiPageDocumentUrl?: string;
45
67
  scans: Scan[];
46
68
  }
@@ -7,37 +7,33 @@
7
7
  <dict>
8
8
  <key>BinaryPath</key>
9
9
  <string>GSSDK.framework/GSSDK</string>
10
- <key>DebugSymbolsPath</key>
11
- <string>dSYMs</string>
12
10
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64_x86_64-simulator</string>
11
+ <string>ios-arm64</string>
14
12
  <key>LibraryPath</key>
15
13
  <string>GSSDK.framework</string>
16
14
  <key>SupportedArchitectures</key>
17
15
  <array>
18
16
  <string>arm64</string>
19
- <string>x86_64</string>
20
17
  </array>
21
18
  <key>SupportedPlatform</key>
22
19
  <string>ios</string>
23
- <key>SupportedPlatformVariant</key>
24
- <string>simulator</string>
25
20
  </dict>
26
21
  <dict>
27
22
  <key>BinaryPath</key>
28
23
  <string>GSSDK.framework/GSSDK</string>
29
- <key>DebugSymbolsPath</key>
30
- <string>dSYMs</string>
31
24
  <key>LibraryIdentifier</key>
32
- <string>ios-arm64</string>
25
+ <string>ios-arm64_x86_64-simulator</string>
33
26
  <key>LibraryPath</key>
34
27
  <string>GSSDK.framework</string>
35
28
  <key>SupportedArchitectures</key>
36
29
  <array>
37
30
  <string>arm64</string>
31
+ <string>x86_64</string>
38
32
  </array>
39
33
  <key>SupportedPlatform</key>
40
34
  <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
41
37
  </dict>
42
38
  </array>
43
39
  <key>CFBundlePackageType</key>
@@ -18,6 +18,14 @@
18
18
 
19
19
  NS_ASSUME_NONNULL_BEGIN
20
20
 
21
+ typedef NS_CLOSED_ENUM(NSInteger, GSKQuadrangleConfidenceLevel) {
22
+ GSKQuadrangleConfidenceLevelLowest,
23
+ GSKQuadrangleConfidenceLevelLow,
24
+ GSKQuadrangleConfidenceLevelMedium,
25
+ GSKQuadrangleConfidenceLevelHigh,
26
+ GSKQuadrangleConfidenceLevelHighest,
27
+ };
28
+
21
29
  /**
22
30
  A configuration for the document detector.
23
31
  */
@@ -43,12 +51,25 @@ NS_ASSUME_NONNULL_BEGIN
43
51
  @interface GSKDocumentDetectionResult: NSObject
44
52
 
45
53
  - (instancetype)initWithQuadrangle:(GSKQuadrangle *)quadrangle;
54
+ - (instancetype)initWithQuadrangle:(GSKQuadrangle *)quadrangle
55
+ quadrangleConfidence:(GSKQuadrangleConfidenceLevel)quadrangleConfidence
56
+ hasQuadrangleConfidence:(BOOL)hasQuadrangleConfidence;
46
57
 
47
58
  /**
48
59
  The detected quadrangle or an empty quadrangle if no document has been detected
49
60
  */
50
61
  @property (nonatomic, strong, readonly) GSKQuadrangle *quadrangle;
51
62
 
63
+ /**
64
+ The confidence associated with the detected quadrangle when available.
65
+ */
66
+ @property (nonatomic, assign, readonly) GSKQuadrangleConfidenceLevel quadrangleConfidence;
67
+
68
+ /**
69
+ Indicates whether a confidence is available for the detected quadrangle.
70
+ */
71
+ @property (nonatomic, assign, readonly) BOOL hasQuadrangleConfidence;
72
+
52
73
  @end
53
74
 
54
75
  /**
@@ -765,7 +765,7 @@ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
765
765
  /// \param cameraViewController The camera view controller
766
766
  ///
767
767
  - (void)cameraViewControllerFailedToFindDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
768
- /// The camera view controller real-time document detection will soon take the photo of a quadrangle, but if the document
768
+ /// The camera view controller real-time document detection will soon capture a detected document, but if the document
769
769
  /// detection is not stable enough, the process can still be
770
770
  /// cancelled.
771
771
  /// It’s a good time to tell the user to remain stable.
@@ -773,18 +773,36 @@ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
773
773
  /// \param cameraViewController The camera view controller
774
774
  ///
775
775
  - (void)cameraViewControllerPhotoStabilizationDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
776
- /// The camera view controller is about to decide whether to automatically take a photo because the detection was stable enough.
776
+ /// The camera view controller is about to decide whether to automatically capture a detected document because the detection was stable enough.
777
777
  /// This is an override point where you can return <code>false</code> to stop that automatic process from proceeding.
778
778
  /// \param cameraViewController The camera view controller
779
779
  ///
780
780
  - (BOOL)cameraViewControllerShouldSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController SWIFT_WARN_UNUSED_RESULT;
781
- /// The camera view controller is going to automatically take a photo because the detection was stable enough.
782
- /// The photo taking is underway and cannot be interrupted at this stage.
781
+ /// The camera view controller is going to capture a photo, whether the capture was triggered manually or automatically.
782
+ /// When the capture is automatic, this is called after <code>cameraViewController:willAutoCaptureDocumentWithQuadrangle:</code>.
783
783
  /// \param cameraViewController The camera view controller
784
784
  ///
785
- /// \param quadrangle The quadrangle of the document that will be photographed.
785
+ - (void)cameraViewControllerWillCapturePhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
786
+ /// The camera view controller is going to automatically capture a detected document because the detection was stable enough.
787
+ /// The automatic capture is about to start and cannot be interrupted at this stage.
788
+ /// <ul>
789
+ /// <li>
790
+ /// Deprecated: Use <code>cameraViewController(_:willAutoCaptureDocumentWithQuadrangle:)</code> for automatic document captures
791
+ /// or <code>cameraViewControllerWillCapturePhoto(_:)</code> for any capture.
792
+ /// </li>
793
+ /// </ul>
794
+ /// \param cameraViewController The camera view controller
795
+ ///
796
+ /// \param quadrangle The quadrangle of the document that will be captured.
786
797
  ///
787
798
  - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willSnapPhotoWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
799
+ /// The camera view controller is going to automatically capture a detected document because the detection was stable enough.
800
+ /// The automatic capture is about to start and cannot be interrupted at this stage.
801
+ /// \param cameraViewController The camera view controller
802
+ ///
803
+ /// \param quadrangle The quadrangle of the document that will be captured.
804
+ ///
805
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willAutoCaptureDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
788
806
  /// The camera view controller just took a photo, but it hasn’t been post-processed it yet
789
807
  /// \param cameraViewController The camera view controller
790
808
  ///
@@ -1224,7 +1242,8 @@ SWIFT_CLASS("_TtC5GSSDK14GSKPDFDocument")
1224
1242
  @property (nonatomic, readonly, copy) NSString * _Nullable title;
1225
1243
  /// If provided, this password will be used to protect the PDF document.
1226
1244
  /// It will need to be entered to view or edit the document.
1227
- /// RC4 encryption algorithm is used with a 128-bit key.
1245
+ /// AES-256 encryption is used.
1246
+ /// An empty password is treated as no password.
1228
1247
  @property (nonatomic, readonly, copy) NSString * _Nullable password;
1229
1248
  /// If provided, the keywords will be included in the PDF document properties
1230
1249
  @property (nonatomic, readonly, copy) NSString * _Nullable keywords;
@@ -1349,6 +1368,11 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1349
1368
  /// will only scan a single page. The output document will always contain
1350
1369
  /// a single page. Defaults to <code>true</code>.
1351
1370
  @property (nonatomic) BOOL multiPage;
1371
+ /// Whether the user should be presented with a screen that lets them review all
1372
+ /// captured scans at the end of the scan flow, where they’ll be able to edit each
1373
+ /// scan once more before finally submitting the captured scans for processing.
1374
+ /// Defaults to <code>false</code>.
1375
+ @property (nonatomic) BOOL showFinalReview;
1352
1376
  /// What orientation that a scan should be rotated to after it’s been captured.
1353
1377
  /// Defaults to <code>automatic</code>. See <code>GSKScanOrientation</code> for more information.
1354
1378
  @property (nonatomic) enum GSKScanOrientation defaultScanOrientation;
@@ -1372,10 +1396,14 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1372
1396
  /// Whether the photo library button should be hidden during camera-based scan flows. Defaults to <code>false</code>.
1373
1397
  @property (nonatomic) BOOL photoLibraryButtonHidden;
1374
1398
  /// Determines the default flash mode. Combine this with <code>flashButtonHidden</code>
1375
- /// if you want to only allow a specific flash mode. Defaults to <code>.auto</code>.
1399
+ /// if you want to only allow a specific flash mode. Defaults to <code>.off</code>.
1376
1400
  @property (nonatomic) enum GSKScanFlowFlashMode defaultFlashMode;
1377
1401
  /// Determines the document format. Defaults to <code>.PDF</code>.
1378
1402
  @property (nonatomic) enum GSKScanFlowMultiPageFormat multiPageFormat;
1403
+ /// Optional password used to protect generated PDF documents.
1404
+ /// An empty password is treated as no password.
1405
+ /// This only applies when <code>multiPageFormat</code> is <code>.pdf</code>.
1406
+ @property (nonatomic, copy) NSString * _Nullable pdfPassword;
1379
1407
  /// Custom font file used during PDF generation to embed an invisible text
1380
1408
  /// layer. If <code>nil</code>, a default font is used, which only supports Latin languages.
1381
1409
  @property (nonatomic, copy) NSURL * _Nullable pdfFontFileURL;