@thegrizzlylabs/react-native-genius-scan 6.0.0-beta01 → 6.0.0-beta02

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/geniusscansdk/reactnative/RNGeniusScanModule.java +3 -3
  3. package/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Assets.car +0 -0
  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 +5 -3
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +6 -4
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +85 -54
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +0 -3
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/UIImage+GSKUtils.h +5 -1
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +1625 -949
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +51 -49
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +51 -49
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Assets.car +0 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +6 -4
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +170 -108
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +0 -3
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/UIImage+GSKUtils.h +5 -1
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1625 -949
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +51 -49
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +51 -49
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1625 -949
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +51 -49
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +51 -49
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  38. package/package.json +1 -1
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditableFrame.h +0 -67
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKShutterView.h +0 -28
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditableFrame.h +0 -67
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  44. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKShutterView.h +0 -28
@@ -1,6 +1,6 @@
1
1
  #if 0
2
2
  #elif defined(__arm64__) && __arm64__
3
- // Generated by Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
3
+ // Generated by Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
4
4
  #ifndef GSSDK_SWIFT_H
5
5
  #define GSSDK_SWIFT_H
6
6
  #pragma clang diagnostic push
@@ -359,7 +359,14 @@ SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
359
359
  @class GSKBarcodeScanFlowConfiguration;
360
360
  @class UIViewController;
361
361
  @class GSKBarcodeScanFlowResult;
362
- /// A flow for scanning barcodes and QR codes.
362
+ /// A UI flow for scanning barcodes and QR codes using the device camera.
363
+ /// Configure the flow with <code>GSKBarcodeScanFlowConfiguration</code> to select the
364
+ /// barcode types to detect and whether batch mode is enabled. Present it from
365
+ /// a view controller and await a <code>GSKBarcodeScanFlowResult</code> containing the
366
+ /// decoded barcodes.
367
+ /// important:
368
+ /// Camera access requires <code>NSCameraUsageDescription</code> in
369
+ /// <code>Info.plist</code>.
363
370
  SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
364
371
  @interface GSKBarcodeScanFlow : NSObject
365
372
  /// Initializes a new barcode scan flow
@@ -399,7 +406,7 @@ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
399
406
  /// do {
400
407
  /// let result = try await flow.resultByStarting(fromViewController: self)
401
408
  /// print("Scanned codes: \(result.barcodes.map { $0.value })")
402
- /// } catch GSKBarcodeScanFlowError.userCancellation {
409
+ /// } catch GSKScanFlowError.cancellation {
403
410
  /// print("User canceled scanning")
404
411
  /// } catch {
405
412
  /// print("Scanning failed: \(error)")
@@ -419,7 +426,7 @@ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
419
426
  ///
420
427
  /// <ul>
421
428
  /// <li>
422
- /// Typically throws a <code>GSKBarcodeScanFlowError</code>
429
+ /// A <code>GSKScanFlowError</code>
423
430
  /// </li>
424
431
  /// </ul>
425
432
  ///
@@ -473,7 +480,7 @@ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
473
480
  /// \endcode
474
481
  @property (nonatomic) BOOL isBatchModeEnabled;
475
482
  /// The highlight color used for the UI (overlay). Defaults
476
- /// to <code>.green</code>. For good constrast, we recommend using a bright color.
483
+ /// to <code>.green</code>. For good contrast, we recommend using a bright color.
477
484
  @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
478
485
  /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
479
486
  /// default color will be used (blue on iOS, for example).
@@ -494,19 +501,6 @@ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
494
501
  + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
495
502
  @end
496
503
 
497
- /// Enum that defines various errors that can occur during a barcode scan flow.
498
- typedef SWIFT_ENUM(NSInteger, GSKBarcodeScanFlowError, open) {
499
- /// User has canceled the barcode scan flow
500
- GSKBarcodeScanFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 0,
501
- /// A general error due to a bad configuration parameter
502
- GSKBarcodeScanFlowConfigurationError SWIFT_COMPILE_NAME("configuration") = 1,
503
- /// Camera permission was denied
504
- GSKBarcodeScanFlowPermissionDeniedError SWIFT_COMPILE_NAME("permissionDenied") = 2,
505
- /// Failed to initialize the barcode detector
506
- GSKBarcodeScanFlowDetectorError SWIFT_COMPILE_NAME("detectorError") = 3,
507
- };
508
- static NSString * _Nonnull const GSKBarcodeScanFlowErrorDomain = @"GSSDK.GSKBarcodeScanFlowError";
509
-
510
504
  /// The result of a barcode scanning flow.
511
505
  /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
512
506
  /// containing the detected barcode or QR code data.
@@ -572,7 +566,7 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
572
566
  /// A camera view controller to scan documents or barcodes.
573
567
  /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
574
568
  /// By default, <code>cameraView</code> fills the entire screen. You can disable its resizing mask
575
- /// (<code>cameraView.translateAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
569
+ /// (<code>cameraView.translatesAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
576
570
  /// note:
577
571
  ///
578
572
  /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
@@ -580,9 +574,16 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
580
574
  /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
581
575
  /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
582
576
  /// you will need to resume the camera session (see <code>resume()</code>). You also need to “reveal” the shutter screen
583
- /// (see <code>hideShutterView(animated:)</code>.
577
+ /// (see <code>hideShutterView(animated:)</code>).
584
578
  SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
585
579
  @interface GSKCameraViewController : UIViewController
580
+ /// Requests camera access if needed.
581
+ /// This returns immediately when access is already determined. It only shows the system prompt
582
+ /// when access has not been requested yet.
583
+ ///
584
+ /// returns:
585
+ /// <code>true</code> when access is authorized.
586
+ + (void)requestCameraAccessWithCompletionHandler:(void (^ _Nonnull)(BOOL))completionHandler;
586
587
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
587
588
  - (void)viewDidLoad;
588
589
  - (void)viewWillAppear:(BOOL)animated;
@@ -746,24 +747,24 @@ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
746
747
  typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
747
748
  /// No document present in the image
748
749
  GSKDocumentFinderImageTypeNoDocument = 0,
749
- /// A document present in the image, but no crop, perspective correction have been applied
750
+ /// A document is present in the image, but no crop or perspective correction has been applied.
750
751
  GSKDocumentFinderImageTypeUnwarped = 1,
751
- /// A document present in the image, and crop, perspective correction have been applied
752
+ /// A document is present in the image, and crop and perspective correction have been applied.
752
753
  GSKDocumentFinderImageTypeWarped = 2,
753
- /// A document present in the image, crop/perspective correction and
754
- /// enhanced have been applied.
754
+ /// A document is present in the image, and crop/perspective correction and
755
+ /// enhancement have been applied.
755
756
  GSKDocumentFinderImageTypeEnhanced = 3,
756
757
  };
757
758
 
758
759
  @class GSKPDFDocument;
759
760
  @protocol GSKDocumentImageProcessor;
760
761
  @class GSKDocumentGeneratorConfiguration;
761
- /// This class exposes the capacility to generate a PDF document file.
762
+ /// This class exposes the capability to generate a PDF or TIFF multi-page document file.
762
763
  SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
763
764
  @interface GSKDocumentGenerator : NSObject
764
765
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
765
766
  /// Generates a document file based on a document model and a generator configuration.
766
- /// \param document The source document to generate as PDF.
767
+ /// \param document The source document to generate as PDF or TIFF depending on the configuration.
767
768
  ///
768
769
  /// \param imageProcessor An object used to process each source document’s image before inserting it in the resulting document.
769
770
  /// Only used when generating a PDF document
@@ -772,7 +773,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
772
773
  ///
773
774
  - (BOOL)generate:(GSKPDFDocument * _Nonnull)document imageProcessor:(id <GSKDocumentImageProcessor> _Nonnull)imageProcessor configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
774
775
  /// Generates a document file based on a document model and a generator configuration.
775
- /// \param document The source document to generate as PDF.
776
+ /// \param document The source document to generate as PDF or TIFF depending on the configuration.
776
777
  ///
777
778
  /// \param configuration The configuration for the document generation.
778
779
  ///
@@ -786,7 +787,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
786
787
  @interface GSKDocumentGeneratorConfiguration : NSObject
787
788
  + (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
788
789
  + (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
789
- /// The output file format of the document generator. Must be .pdf or .tif.
790
+ /// The output file format of the document generator. Must be .pdf or .tiff.
790
791
  @property (nonatomic, readonly) enum GSKDocumentGeneratorFileFormat outputFileFormat;
791
792
  /// The path where the generated document will be written. The extension will not be validated.
792
793
  @property (nonatomic, readonly, copy) NSString * _Nonnull outputFilePath;
@@ -817,7 +818,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
817
818
 
818
819
  SWIFT_CLASS("_TtC5GSSDK38GSKDocumentGeneratorDebugConfiguration")
819
820
  @interface GSKDocumentGeneratorDebugConfiguration : NSObject
820
- /// If true, OCR’ed text will visible on the PDF.
821
+ /// If true, OCR’ed text will be visible on the PDF.
821
822
  /// Defaults to false. Use this for debug only
822
823
  @property (nonatomic, readonly) BOOL isOCRTextShownOnPDF;
823
824
  - (nonnull instancetype)initWithIsOCRTextShownOnPDF:(BOOL)isOCRTextShownOnPDF OBJC_DESIGNATED_INITIALIZER;
@@ -863,6 +864,16 @@ SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
863
864
 
864
865
  @class UIImage;
865
866
  @class UIView;
867
+ /// A view controller that displays a scanned image with an interactive quadrangle overlay
868
+ /// for manual cropping and perspective adjustment.
869
+ /// <code>GSKEditFrameViewController</code> presents an image and allows the user to refine the detected
870
+ /// document boundaries by dragging the quadrangle’s corner handles. As the user edits the
871
+ /// quadrangle, changes are reflected in the <code>quadrangle</code> property, which is Key-Value
872
+ /// Observing (KVO) compliant.
873
+ /// The overlay’s appearance—including colors, handle size, transparency, and magnifier
874
+ /// behavior—can be customized through the exposed properties. This view controller is
875
+ /// typically used after automatic document detection, to let the user fine-tune the crop
876
+ /// before further processing (such as perspective correction or export).
866
877
  SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
867
878
  @interface GSKEditFrameViewController : UIViewController
868
879
  /// The image on which the quadrangle is overlaid.
@@ -870,6 +881,10 @@ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
870
881
  @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
871
882
  /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
872
883
  @property (nonatomic, strong) GSKQuadrangle * _Nonnull quadrangle;
884
+ /// Insets applied around the image.
885
+ /// By default this matches half the quadrangle overlay handle width, so handles remain visible even when
886
+ /// the corners are on the edge of the image.
887
+ @property (nonatomic) CGFloat inset;
873
888
  /// Customize the color of the shade within the quadrangle.
874
889
  @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
875
890
  /// Customize the color of the shade outside the quadrangle.
@@ -878,6 +893,8 @@ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
878
893
  @property (nonatomic, strong) UIColor * _Nonnull lineColor;
879
894
  /// Customize the width of the corner handles.
880
895
  @property (nonatomic) CGFloat handleWidth;
896
+ /// Customize the transparency of the entire overlay
897
+ @property (nonatomic) CGFloat overlayAlpha;
881
898
  /// Customize the magnifier center style shown while dragging corners.
882
899
  @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
883
900
  /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
@@ -1101,14 +1118,14 @@ SWIFT_CLASS("_TtC5GSSDK6GSKOCR")
1101
1118
  /// The OCR decides what post-processing to apply for the best results.
1102
1119
  ///
1103
1120
  /// \param configuration Configuration for the OCR process, in particular the language in which the OCR is
1104
- /// performed. Note that you must provided the appropriate trained data.
1121
+ /// performed. Note that you must provide the appropriate trained data.
1105
1122
  ///
1106
1123
  /// \param progressBlock The progress between 0 and 1. Called on the same thread.
1107
1124
  ///
1108
1125
  ///
1109
1126
  /// returns:
1110
1127
  /// An OCR result.
1111
- - (void)recognizeTextForImageAtPath:(NSString * _Nonnull)imagePath ocrConfiguration:(GSKOCRConfiguration * _Nonnull)configuration onProgress:(void (^ _Nullable)(float))progressBlock completionHandler:(void (^ _Nonnull)(GSKOCRResult * _Nullable, NSError * _Nullable))completionHandler;
1128
+ - (void)recognizeTextForImageAtPath:(NSString * _Nonnull)imagePath configuration:(GSKOCRConfiguration * _Nonnull)configuration onProgress:(void (^ _Nullable)(float))progressBlock completionHandler:(void (^ _Nonnull)(GSKOCRResult * _Nullable, NSError * _Nullable))completionHandler;
1112
1129
  @end
1113
1130
 
1114
1131
  /// The configuration for an OCR operation.
@@ -1214,9 +1231,15 @@ SWIFT_CLASS("_TtC5GSSDK13GSKReceiptVAT")
1214
1231
  @end
1215
1232
 
1216
1233
  @class GSKScanFlowConfiguration;
1217
- /// A high-level scanner module.
1218
- /// You present it and when the user is done, you obtain a result object containing the scanned documents.
1219
- /// The scan flow can be customized with a <code>GSKScanFlowConfiguration</code> instance.
1234
+ /// A UI-driven scan flow for turning physical documents into processed digital pages.
1235
+ /// Create an instance with <code>GSKScanFlowConfiguration</code> to choose the source
1236
+ /// (camera, photo library, or image URL), multi-page behavior, output format,
1237
+ /// filters, OCR, and structured-data extraction. Present the flow from a view
1238
+ /// controller and await a <code>GSKScanFlowResult</code> with the captured pages and the
1239
+ /// optional multi-page document.
1240
+ /// important:
1241
+ /// If you start a scan flow with the camera, your app must declare the
1242
+ /// <code>NSCameraUsageDescription</code> key in <code>Info.plist</code>.
1220
1243
  SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
1221
1244
  @interface GSKScanFlow : NSObject
1222
1245
  - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
@@ -1335,13 +1358,25 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1335
1358
  + (nullable instancetype)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1336
1359
  @end
1337
1360
 
1338
- /// Enum that defines various errors that can occur during a scan flow.
1339
- typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
1361
+ /// Enum that defines various numeric error codes that can occur during a scan flow.
1362
+ typedef SWIFT_ENUM(NSInteger, GSKScanFlowErrorCode, open) {
1340
1363
  /// User has canceled the scan flow
1341
- GSKScanFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 999,
1342
- /// A general error due to a bad input parameter. Verify that your
1364
+ GSKScanFlowCancellationErrorCode SWIFT_COMPILE_NAME("cancellation") = 999,
1365
+ /// A general error due to an incorrect configuration. Verify that your
1343
1366
  /// inputs match the API requirements.
1344
- GSKScanFlowBadInputError SWIFT_COMPILE_NAME("badInput") = 1000,
1367
+ GSKScanFlowConfigurationErrorCode SWIFT_COMPILE_NAME("configuration") = 1000,
1368
+ /// A licensing error. This is a developer error and you should contact the
1369
+ /// Genius Scan SDK support team to make sure you have a valid license key.
1370
+ GSKScanFlowLicensingErrorCode SWIFT_COMPILE_NAME("licensing") = 1001,
1371
+ /// An error that happened while capturing the scans. This can sometimes be recovered
1372
+ /// by restarting the device.
1373
+ GSKScanFlowCaptureErrorCode SWIFT_COMPILE_NAME("capture") = 1002,
1374
+ /// An error caused by low storage space. This can be recovered by cleaning up
1375
+ /// storage space and trying again.
1376
+ GSKScanFlowStorageSpaceErrorCode SWIFT_COMPILE_NAME("storageSpace") = 1003,
1377
+ /// An internal error. This is a catch-all category, and the underlying error will
1378
+ /// give more details.
1379
+ GSKScanFlowInternalErrorCode SWIFT_COMPILE_NAME("internal") = 9999,
1345
1380
  };
1346
1381
 
1347
1382
  /// The different possible filters for the scanner UI.
@@ -1386,8 +1421,8 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowFlashMode, open) {
1386
1421
  /// The format of the exported document.
1387
1422
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowMultiPageFormat, open) {
1388
1423
  GSKScanFlowNone SWIFT_COMPILE_NAME("none") = 0,
1389
- GSKScanFlowPDF SWIFT_COMPILE_NAME("PDF") = 1,
1390
- GSKScanFlowTIFF SWIFT_COMPILE_NAME("TIFF") = 2,
1424
+ GSKScanFlowPDF SWIFT_COMPILE_NAME("pdf") = 1,
1425
+ GSKScanFlowTIFF SWIFT_COMPILE_NAME("tiff") = 2,
1391
1426
  };
1392
1427
 
1393
1428
  /// The configuration for text recognition
@@ -1426,9 +1461,9 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
1426
1461
  SWIFT_CLASS("_TtC5GSSDK17GSKScanFlowResult")
1427
1462
  @interface GSKScanFlowResult : NSObject
1428
1463
  /// Document containing the pages that were scanned during the scan
1429
- /// flow. The format is specified by <code>multiPageFormat</code> property of
1430
- /// the used <code>GSKScanFlowConfiguration</code>. Is <code>nil</code> if no format was
1431
- /// specified or if generation failed.
1464
+ /// flow. The format is specified by the <code>multiPageFormat</code> property of
1465
+ /// the <code>GSKScanFlowConfiguration</code> used for the scan flow. This is <code>nil</code>
1466
+ /// when <code>multiPageFormat</code> is <code>.none</code> or if document generation failed.
1432
1467
  @property (nonatomic, copy) NSURL * _Nullable multiPageDocumentURL;
1433
1468
  /// The individual scans taken during the scan flow.
1434
1469
  /// Each scan object contains both the original and the enhanced scans.
@@ -1632,23 +1667,19 @@ SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
1632
1667
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1633
1668
  @end
1634
1669
 
1635
- @class GSKTextLayoutToTextConverterResult;
1670
+ /// Converts an OCR text layout into plain text.
1671
+ /// A <code>GSKOCRResult</code> contains both raw text and a <code>GSKTextLayout</code>, which preserves spatial information such as
1672
+ /// bounding boxes and line/word positions. This converter reconstructs the raw text from a <code>GSKTextLayout</code> by
1673
+ /// traversing its bounding boxes in reading order and grouping content into paragraphs.
1674
+ /// Use this when you want to retain only the spatial representation (for highlighting, selection, reflow, etc.)
1675
+ /// and regenerate the plain-text representation on demand, rather than storing both.
1636
1676
  SWIFT_CLASS("_TtC5GSSDK28GSKTextLayoutToTextConverter")
1637
1677
  @interface GSKTextLayoutToTextConverter : NSObject
1638
- - (GSKTextLayoutToTextConverterResult * _Nullable)convert:(GSKTextLayout * _Nonnull)textLayout error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1639
1678
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1640
1679
  @end
1641
1680
 
1642
1681
  SWIFT_CLASS("_TtC5GSSDK34GSKTextLayoutToTextConverterResult")
1643
1682
  @interface GSKTextLayoutToTextConverterResult : NSObject
1644
- /// The text reconstructed from the text layout.
1645
- @property (nonatomic, readonly, copy) NSString * _Nonnull text;
1646
- /// The average word confidence of the recognized text.
1647
- /// A value between 0 and 100
1648
- @property (nonatomic, readonly) NSInteger averageWordConfidence;
1649
- /// The number of words in the recognized text.
1650
- /// This is the number of words on which the average word confidence has been computed.
1651
- @property (nonatomic, readonly) NSInteger wordCount;
1652
1683
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1653
1684
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1654
1685
  @end
@@ -1688,7 +1719,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
1688
1719
  #endif
1689
1720
 
1690
1721
  #elif defined(__x86_64__) && __x86_64__
1691
- // Generated by Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
1722
+ // Generated by Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
1692
1723
  #ifndef GSSDK_SWIFT_H
1693
1724
  #define GSSDK_SWIFT_H
1694
1725
  #pragma clang diagnostic push
@@ -2047,7 +2078,14 @@ SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
2047
2078
  @class GSKBarcodeScanFlowConfiguration;
2048
2079
  @class UIViewController;
2049
2080
  @class GSKBarcodeScanFlowResult;
2050
- /// A flow for scanning barcodes and QR codes.
2081
+ /// A UI flow for scanning barcodes and QR codes using the device camera.
2082
+ /// Configure the flow with <code>GSKBarcodeScanFlowConfiguration</code> to select the
2083
+ /// barcode types to detect and whether batch mode is enabled. Present it from
2084
+ /// a view controller and await a <code>GSKBarcodeScanFlowResult</code> containing the
2085
+ /// decoded barcodes.
2086
+ /// important:
2087
+ /// Camera access requires <code>NSCameraUsageDescription</code> in
2088
+ /// <code>Info.plist</code>.
2051
2089
  SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2052
2090
  @interface GSKBarcodeScanFlow : NSObject
2053
2091
  /// Initializes a new barcode scan flow
@@ -2087,7 +2125,7 @@ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2087
2125
  /// do {
2088
2126
  /// let result = try await flow.resultByStarting(fromViewController: self)
2089
2127
  /// print("Scanned codes: \(result.barcodes.map { $0.value })")
2090
- /// } catch GSKBarcodeScanFlowError.userCancellation {
2128
+ /// } catch GSKScanFlowError.cancellation {
2091
2129
  /// print("User canceled scanning")
2092
2130
  /// } catch {
2093
2131
  /// print("Scanning failed: \(error)")
@@ -2107,7 +2145,7 @@ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2107
2145
  ///
2108
2146
  /// <ul>
2109
2147
  /// <li>
2110
- /// Typically throws a <code>GSKBarcodeScanFlowError</code>
2148
+ /// A <code>GSKScanFlowError</code>
2111
2149
  /// </li>
2112
2150
  /// </ul>
2113
2151
  ///
@@ -2161,7 +2199,7 @@ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
2161
2199
  /// \endcode
2162
2200
  @property (nonatomic) BOOL isBatchModeEnabled;
2163
2201
  /// The highlight color used for the UI (overlay). Defaults
2164
- /// to <code>.green</code>. For good constrast, we recommend using a bright color.
2202
+ /// to <code>.green</code>. For good contrast, we recommend using a bright color.
2165
2203
  @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
2166
2204
  /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
2167
2205
  /// default color will be used (blue on iOS, for example).
@@ -2182,19 +2220,6 @@ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
2182
2220
  + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2183
2221
  @end
2184
2222
 
2185
- /// Enum that defines various errors that can occur during a barcode scan flow.
2186
- typedef SWIFT_ENUM(NSInteger, GSKBarcodeScanFlowError, open) {
2187
- /// User has canceled the barcode scan flow
2188
- GSKBarcodeScanFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 0,
2189
- /// A general error due to a bad configuration parameter
2190
- GSKBarcodeScanFlowConfigurationError SWIFT_COMPILE_NAME("configuration") = 1,
2191
- /// Camera permission was denied
2192
- GSKBarcodeScanFlowPermissionDeniedError SWIFT_COMPILE_NAME("permissionDenied") = 2,
2193
- /// Failed to initialize the barcode detector
2194
- GSKBarcodeScanFlowDetectorError SWIFT_COMPILE_NAME("detectorError") = 3,
2195
- };
2196
- static NSString * _Nonnull const GSKBarcodeScanFlowErrorDomain = @"GSSDK.GSKBarcodeScanFlowError";
2197
-
2198
2223
  /// The result of a barcode scanning flow.
2199
2224
  /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
2200
2225
  /// containing the detected barcode or QR code data.
@@ -2260,7 +2285,7 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
2260
2285
  /// A camera view controller to scan documents or barcodes.
2261
2286
  /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
2262
2287
  /// By default, <code>cameraView</code> fills the entire screen. You can disable its resizing mask
2263
- /// (<code>cameraView.translateAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
2288
+ /// (<code>cameraView.translatesAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
2264
2289
  /// note:
2265
2290
  ///
2266
2291
  /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
@@ -2268,9 +2293,16 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
2268
2293
  /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
2269
2294
  /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
2270
2295
  /// you will need to resume the camera session (see <code>resume()</code>). You also need to “reveal” the shutter screen
2271
- /// (see <code>hideShutterView(animated:)</code>.
2296
+ /// (see <code>hideShutterView(animated:)</code>).
2272
2297
  SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
2273
2298
  @interface GSKCameraViewController : UIViewController
2299
+ /// Requests camera access if needed.
2300
+ /// This returns immediately when access is already determined. It only shows the system prompt
2301
+ /// when access has not been requested yet.
2302
+ ///
2303
+ /// returns:
2304
+ /// <code>true</code> when access is authorized.
2305
+ + (void)requestCameraAccessWithCompletionHandler:(void (^ _Nonnull)(BOOL))completionHandler;
2274
2306
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
2275
2307
  - (void)viewDidLoad;
2276
2308
  - (void)viewWillAppear:(BOOL)animated;
@@ -2434,24 +2466,24 @@ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
2434
2466
  typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
2435
2467
  /// No document present in the image
2436
2468
  GSKDocumentFinderImageTypeNoDocument = 0,
2437
- /// A document present in the image, but no crop, perspective correction have been applied
2469
+ /// A document is present in the image, but no crop or perspective correction has been applied.
2438
2470
  GSKDocumentFinderImageTypeUnwarped = 1,
2439
- /// A document present in the image, and crop, perspective correction have been applied
2471
+ /// A document is present in the image, and crop and perspective correction have been applied.
2440
2472
  GSKDocumentFinderImageTypeWarped = 2,
2441
- /// A document present in the image, crop/perspective correction and
2442
- /// enhanced have been applied.
2473
+ /// A document is present in the image, and crop/perspective correction and
2474
+ /// enhancement have been applied.
2443
2475
  GSKDocumentFinderImageTypeEnhanced = 3,
2444
2476
  };
2445
2477
 
2446
2478
  @class GSKPDFDocument;
2447
2479
  @protocol GSKDocumentImageProcessor;
2448
2480
  @class GSKDocumentGeneratorConfiguration;
2449
- /// This class exposes the capacility to generate a PDF document file.
2481
+ /// This class exposes the capability to generate a PDF or TIFF multi-page document file.
2450
2482
  SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
2451
2483
  @interface GSKDocumentGenerator : NSObject
2452
2484
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
2453
2485
  /// Generates a document file based on a document model and a generator configuration.
2454
- /// \param document The source document to generate as PDF.
2486
+ /// \param document The source document to generate as PDF or TIFF depending on the configuration.
2455
2487
  ///
2456
2488
  /// \param imageProcessor An object used to process each source document’s image before inserting it in the resulting document.
2457
2489
  /// Only used when generating a PDF document
@@ -2460,7 +2492,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
2460
2492
  ///
2461
2493
  - (BOOL)generate:(GSKPDFDocument * _Nonnull)document imageProcessor:(id <GSKDocumentImageProcessor> _Nonnull)imageProcessor configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
2462
2494
  /// Generates a document file based on a document model and a generator configuration.
2463
- /// \param document The source document to generate as PDF.
2495
+ /// \param document The source document to generate as PDF or TIFF depending on the configuration.
2464
2496
  ///
2465
2497
  /// \param configuration The configuration for the document generation.
2466
2498
  ///
@@ -2474,7 +2506,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
2474
2506
  @interface GSKDocumentGeneratorConfiguration : NSObject
2475
2507
  + (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
2476
2508
  + (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
2477
- /// The output file format of the document generator. Must be .pdf or .tif.
2509
+ /// The output file format of the document generator. Must be .pdf or .tiff.
2478
2510
  @property (nonatomic, readonly) enum GSKDocumentGeneratorFileFormat outputFileFormat;
2479
2511
  /// The path where the generated document will be written. The extension will not be validated.
2480
2512
  @property (nonatomic, readonly, copy) NSString * _Nonnull outputFilePath;
@@ -2505,7 +2537,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
2505
2537
 
2506
2538
  SWIFT_CLASS("_TtC5GSSDK38GSKDocumentGeneratorDebugConfiguration")
2507
2539
  @interface GSKDocumentGeneratorDebugConfiguration : NSObject
2508
- /// If true, OCR’ed text will visible on the PDF.
2540
+ /// If true, OCR’ed text will be visible on the PDF.
2509
2541
  /// Defaults to false. Use this for debug only
2510
2542
  @property (nonatomic, readonly) BOOL isOCRTextShownOnPDF;
2511
2543
  - (nonnull instancetype)initWithIsOCRTextShownOnPDF:(BOOL)isOCRTextShownOnPDF OBJC_DESIGNATED_INITIALIZER;
@@ -2551,6 +2583,16 @@ SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
2551
2583
 
2552
2584
  @class UIImage;
2553
2585
  @class UIView;
2586
+ /// A view controller that displays a scanned image with an interactive quadrangle overlay
2587
+ /// for manual cropping and perspective adjustment.
2588
+ /// <code>GSKEditFrameViewController</code> presents an image and allows the user to refine the detected
2589
+ /// document boundaries by dragging the quadrangle’s corner handles. As the user edits the
2590
+ /// quadrangle, changes are reflected in the <code>quadrangle</code> property, which is Key-Value
2591
+ /// Observing (KVO) compliant.
2592
+ /// The overlay’s appearance—including colors, handle size, transparency, and magnifier
2593
+ /// behavior—can be customized through the exposed properties. This view controller is
2594
+ /// typically used after automatic document detection, to let the user fine-tune the crop
2595
+ /// before further processing (such as perspective correction or export).
2554
2596
  SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2555
2597
  @interface GSKEditFrameViewController : UIViewController
2556
2598
  /// The image on which the quadrangle is overlaid.
@@ -2558,6 +2600,10 @@ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2558
2600
  @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
2559
2601
  /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
2560
2602
  @property (nonatomic, strong) GSKQuadrangle * _Nonnull quadrangle;
2603
+ /// Insets applied around the image.
2604
+ /// By default this matches half the quadrangle overlay handle width, so handles remain visible even when
2605
+ /// the corners are on the edge of the image.
2606
+ @property (nonatomic) CGFloat inset;
2561
2607
  /// Customize the color of the shade within the quadrangle.
2562
2608
  @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
2563
2609
  /// Customize the color of the shade outside the quadrangle.
@@ -2566,6 +2612,8 @@ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2566
2612
  @property (nonatomic, strong) UIColor * _Nonnull lineColor;
2567
2613
  /// Customize the width of the corner handles.
2568
2614
  @property (nonatomic) CGFloat handleWidth;
2615
+ /// Customize the transparency of the entire overlay
2616
+ @property (nonatomic) CGFloat overlayAlpha;
2569
2617
  /// Customize the magnifier center style shown while dragging corners.
2570
2618
  @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
2571
2619
  /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
@@ -2789,14 +2837,14 @@ SWIFT_CLASS("_TtC5GSSDK6GSKOCR")
2789
2837
  /// The OCR decides what post-processing to apply for the best results.
2790
2838
  ///
2791
2839
  /// \param configuration Configuration for the OCR process, in particular the language in which the OCR is
2792
- /// performed. Note that you must provided the appropriate trained data.
2840
+ /// performed. Note that you must provide the appropriate trained data.
2793
2841
  ///
2794
2842
  /// \param progressBlock The progress between 0 and 1. Called on the same thread.
2795
2843
  ///
2796
2844
  ///
2797
2845
  /// returns:
2798
2846
  /// An OCR result.
2799
- - (void)recognizeTextForImageAtPath:(NSString * _Nonnull)imagePath ocrConfiguration:(GSKOCRConfiguration * _Nonnull)configuration onProgress:(void (^ _Nullable)(float))progressBlock completionHandler:(void (^ _Nonnull)(GSKOCRResult * _Nullable, NSError * _Nullable))completionHandler;
2847
+ - (void)recognizeTextForImageAtPath:(NSString * _Nonnull)imagePath configuration:(GSKOCRConfiguration * _Nonnull)configuration onProgress:(void (^ _Nullable)(float))progressBlock completionHandler:(void (^ _Nonnull)(GSKOCRResult * _Nullable, NSError * _Nullable))completionHandler;
2800
2848
  @end
2801
2849
 
2802
2850
  /// The configuration for an OCR operation.
@@ -2902,9 +2950,15 @@ SWIFT_CLASS("_TtC5GSSDK13GSKReceiptVAT")
2902
2950
  @end
2903
2951
 
2904
2952
  @class GSKScanFlowConfiguration;
2905
- /// A high-level scanner module.
2906
- /// You present it and when the user is done, you obtain a result object containing the scanned documents.
2907
- /// The scan flow can be customized with a <code>GSKScanFlowConfiguration</code> instance.
2953
+ /// A UI-driven scan flow for turning physical documents into processed digital pages.
2954
+ /// Create an instance with <code>GSKScanFlowConfiguration</code> to choose the source
2955
+ /// (camera, photo library, or image URL), multi-page behavior, output format,
2956
+ /// filters, OCR, and structured-data extraction. Present the flow from a view
2957
+ /// controller and await a <code>GSKScanFlowResult</code> with the captured pages and the
2958
+ /// optional multi-page document.
2959
+ /// important:
2960
+ /// If you start a scan flow with the camera, your app must declare the
2961
+ /// <code>NSCameraUsageDescription</code> key in <code>Info.plist</code>.
2908
2962
  SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
2909
2963
  @interface GSKScanFlow : NSObject
2910
2964
  - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
@@ -3023,13 +3077,25 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
3023
3077
  + (nullable instancetype)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
3024
3078
  @end
3025
3079
 
3026
- /// Enum that defines various errors that can occur during a scan flow.
3027
- typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
3080
+ /// Enum that defines various numeric error codes that can occur during a scan flow.
3081
+ typedef SWIFT_ENUM(NSInteger, GSKScanFlowErrorCode, open) {
3028
3082
  /// User has canceled the scan flow
3029
- GSKScanFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 999,
3030
- /// A general error due to a bad input parameter. Verify that your
3083
+ GSKScanFlowCancellationErrorCode SWIFT_COMPILE_NAME("cancellation") = 999,
3084
+ /// A general error due to an incorrect configuration. Verify that your
3031
3085
  /// inputs match the API requirements.
3032
- GSKScanFlowBadInputError SWIFT_COMPILE_NAME("badInput") = 1000,
3086
+ GSKScanFlowConfigurationErrorCode SWIFT_COMPILE_NAME("configuration") = 1000,
3087
+ /// A licensing error. This is a developer error and you should contact the
3088
+ /// Genius Scan SDK support team to make sure you have a valid license key.
3089
+ GSKScanFlowLicensingErrorCode SWIFT_COMPILE_NAME("licensing") = 1001,
3090
+ /// An error that happened while capturing the scans. This can sometimes be recovered
3091
+ /// by restarting the device.
3092
+ GSKScanFlowCaptureErrorCode SWIFT_COMPILE_NAME("capture") = 1002,
3093
+ /// An error caused by low storage space. This can be recovered by cleaning up
3094
+ /// storage space and trying again.
3095
+ GSKScanFlowStorageSpaceErrorCode SWIFT_COMPILE_NAME("storageSpace") = 1003,
3096
+ /// An internal error. This is a catch-all category, and the underlying error will
3097
+ /// give more details.
3098
+ GSKScanFlowInternalErrorCode SWIFT_COMPILE_NAME("internal") = 9999,
3033
3099
  };
3034
3100
 
3035
3101
  /// The different possible filters for the scanner UI.
@@ -3074,8 +3140,8 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowFlashMode, open) {
3074
3140
  /// The format of the exported document.
3075
3141
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowMultiPageFormat, open) {
3076
3142
  GSKScanFlowNone SWIFT_COMPILE_NAME("none") = 0,
3077
- GSKScanFlowPDF SWIFT_COMPILE_NAME("PDF") = 1,
3078
- GSKScanFlowTIFF SWIFT_COMPILE_NAME("TIFF") = 2,
3143
+ GSKScanFlowPDF SWIFT_COMPILE_NAME("pdf") = 1,
3144
+ GSKScanFlowTIFF SWIFT_COMPILE_NAME("tiff") = 2,
3079
3145
  };
3080
3146
 
3081
3147
  /// The configuration for text recognition
@@ -3114,9 +3180,9 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
3114
3180
  SWIFT_CLASS("_TtC5GSSDK17GSKScanFlowResult")
3115
3181
  @interface GSKScanFlowResult : NSObject
3116
3182
  /// Document containing the pages that were scanned during the scan
3117
- /// flow. The format is specified by <code>multiPageFormat</code> property of
3118
- /// the used <code>GSKScanFlowConfiguration</code>. Is <code>nil</code> if no format was
3119
- /// specified or if generation failed.
3183
+ /// flow. The format is specified by the <code>multiPageFormat</code> property of
3184
+ /// the <code>GSKScanFlowConfiguration</code> used for the scan flow. This is <code>nil</code>
3185
+ /// when <code>multiPageFormat</code> is <code>.none</code> or if document generation failed.
3120
3186
  @property (nonatomic, copy) NSURL * _Nullable multiPageDocumentURL;
3121
3187
  /// The individual scans taken during the scan flow.
3122
3188
  /// Each scan object contains both the original and the enhanced scans.
@@ -3320,23 +3386,19 @@ SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
3320
3386
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3321
3387
  @end
3322
3388
 
3323
- @class GSKTextLayoutToTextConverterResult;
3389
+ /// Converts an OCR text layout into plain text.
3390
+ /// A <code>GSKOCRResult</code> contains both raw text and a <code>GSKTextLayout</code>, which preserves spatial information such as
3391
+ /// bounding boxes and line/word positions. This converter reconstructs the raw text from a <code>GSKTextLayout</code> by
3392
+ /// traversing its bounding boxes in reading order and grouping content into paragraphs.
3393
+ /// Use this when you want to retain only the spatial representation (for highlighting, selection, reflow, etc.)
3394
+ /// and regenerate the plain-text representation on demand, rather than storing both.
3324
3395
  SWIFT_CLASS("_TtC5GSSDK28GSKTextLayoutToTextConverter")
3325
3396
  @interface GSKTextLayoutToTextConverter : NSObject
3326
- - (GSKTextLayoutToTextConverterResult * _Nullable)convert:(GSKTextLayout * _Nonnull)textLayout error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
3327
3397
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3328
3398
  @end
3329
3399
 
3330
3400
  SWIFT_CLASS("_TtC5GSSDK34GSKTextLayoutToTextConverterResult")
3331
3401
  @interface GSKTextLayoutToTextConverterResult : NSObject
3332
- /// The text reconstructed from the text layout.
3333
- @property (nonatomic, readonly, copy) NSString * _Nonnull text;
3334
- /// The average word confidence of the recognized text.
3335
- /// A value between 0 and 100
3336
- @property (nonatomic, readonly) NSInteger averageWordConfidence;
3337
- /// The number of words in the recognized text.
3338
- /// This is the number of words on which the average word confidence has been computed.
3339
- @property (nonatomic, readonly) NSInteger wordCount;
3340
3402
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3341
3403
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3342
3404
  @end