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

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 (51) hide show
  1. package/README.md +21 -0
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/geniusscansdk/reactnative/RNGeniusScanModule.java +9 -4
  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/GSKScanFlowError+PluginPayload.h +11 -0
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +6 -4
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +91 -54
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +1 -3
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/UIImage+GSKUtils.h +5 -1
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +1975 -1090
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +56 -49
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +56 -49
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Assets.car +0 -0
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowError+PluginPayload.h +11 -0
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +6 -4
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +182 -108
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +1 -3
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/UIImage+GSKUtils.h +5 -1
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1975 -1090
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +56 -49
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +56 -49
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1975 -1090
  38. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +56 -49
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +56 -49
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  44. package/ios/RNGeniusScan.m +22 -7
  45. package/package.json +1 -1
  46. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditableFrame.h +0 -67
  47. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  48. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKShutterView.h +0 -28
  49. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditableFrame.h +0 -67
  50. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  51. 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,15 +1358,33 @@ 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
 
1382
+ SWIFT_CLASS("_TtC5GSSDK26GSKScanFlowErrorCodeBridge")
1383
+ @interface GSKScanFlowErrorCodeBridge : NSObject
1384
+ + (NSString * _Nonnull)stringCodeForRawValue:(NSInteger)rawValue SWIFT_WARN_UNUSED_RESULT;
1385
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1386
+ @end
1387
+
1347
1388
  /// The different possible filters for the scanner UI.
1348
1389
  /// Each case maps to a predefined filter configuration except <code>.automatic</code>.
1349
1390
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
@@ -1386,8 +1427,8 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowFlashMode, open) {
1386
1427
  /// The format of the exported document.
1387
1428
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowMultiPageFormat, open) {
1388
1429
  GSKScanFlowNone SWIFT_COMPILE_NAME("none") = 0,
1389
- GSKScanFlowPDF SWIFT_COMPILE_NAME("PDF") = 1,
1390
- GSKScanFlowTIFF SWIFT_COMPILE_NAME("TIFF") = 2,
1430
+ GSKScanFlowPDF SWIFT_COMPILE_NAME("pdf") = 1,
1431
+ GSKScanFlowTIFF SWIFT_COMPILE_NAME("tiff") = 2,
1391
1432
  };
1392
1433
 
1393
1434
  /// The configuration for text recognition
@@ -1426,9 +1467,9 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
1426
1467
  SWIFT_CLASS("_TtC5GSSDK17GSKScanFlowResult")
1427
1468
  @interface GSKScanFlowResult : NSObject
1428
1469
  /// 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.
1470
+ /// flow. The format is specified by the <code>multiPageFormat</code> property of
1471
+ /// the <code>GSKScanFlowConfiguration</code> used for the scan flow. This is <code>nil</code>
1472
+ /// when <code>multiPageFormat</code> is <code>.none</code> or if document generation failed.
1432
1473
  @property (nonatomic, copy) NSURL * _Nullable multiPageDocumentURL;
1433
1474
  /// The individual scans taken during the scan flow.
1434
1475
  /// Each scan object contains both the original and the enhanced scans.
@@ -1632,23 +1673,19 @@ SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
1632
1673
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1633
1674
  @end
1634
1675
 
1635
- @class GSKTextLayoutToTextConverterResult;
1676
+ /// Converts an OCR text layout into plain text.
1677
+ /// A <code>GSKOCRResult</code> contains both raw text and a <code>GSKTextLayout</code>, which preserves spatial information such as
1678
+ /// bounding boxes and line/word positions. This converter reconstructs the raw text from a <code>GSKTextLayout</code> by
1679
+ /// traversing its bounding boxes in reading order and grouping content into paragraphs.
1680
+ /// Use this when you want to retain only the spatial representation (for highlighting, selection, reflow, etc.)
1681
+ /// and regenerate the plain-text representation on demand, rather than storing both.
1636
1682
  SWIFT_CLASS("_TtC5GSSDK28GSKTextLayoutToTextConverter")
1637
1683
  @interface GSKTextLayoutToTextConverter : NSObject
1638
- - (GSKTextLayoutToTextConverterResult * _Nullable)convert:(GSKTextLayout * _Nonnull)textLayout error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1639
1684
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1640
1685
  @end
1641
1686
 
1642
1687
  SWIFT_CLASS("_TtC5GSSDK34GSKTextLayoutToTextConverterResult")
1643
1688
  @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
1689
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1653
1690
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1654
1691
  @end
@@ -1688,7 +1725,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
1688
1725
  #endif
1689
1726
 
1690
1727
  #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)
1728
+ // Generated by Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
1692
1729
  #ifndef GSSDK_SWIFT_H
1693
1730
  #define GSSDK_SWIFT_H
1694
1731
  #pragma clang diagnostic push
@@ -2047,7 +2084,14 @@ SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
2047
2084
  @class GSKBarcodeScanFlowConfiguration;
2048
2085
  @class UIViewController;
2049
2086
  @class GSKBarcodeScanFlowResult;
2050
- /// A flow for scanning barcodes and QR codes.
2087
+ /// A UI flow for scanning barcodes and QR codes using the device camera.
2088
+ /// Configure the flow with <code>GSKBarcodeScanFlowConfiguration</code> to select the
2089
+ /// barcode types to detect and whether batch mode is enabled. Present it from
2090
+ /// a view controller and await a <code>GSKBarcodeScanFlowResult</code> containing the
2091
+ /// decoded barcodes.
2092
+ /// important:
2093
+ /// Camera access requires <code>NSCameraUsageDescription</code> in
2094
+ /// <code>Info.plist</code>.
2051
2095
  SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2052
2096
  @interface GSKBarcodeScanFlow : NSObject
2053
2097
  /// Initializes a new barcode scan flow
@@ -2087,7 +2131,7 @@ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2087
2131
  /// do {
2088
2132
  /// let result = try await flow.resultByStarting(fromViewController: self)
2089
2133
  /// print("Scanned codes: \(result.barcodes.map { $0.value })")
2090
- /// } catch GSKBarcodeScanFlowError.userCancellation {
2134
+ /// } catch GSKScanFlowError.cancellation {
2091
2135
  /// print("User canceled scanning")
2092
2136
  /// } catch {
2093
2137
  /// print("Scanning failed: \(error)")
@@ -2107,7 +2151,7 @@ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2107
2151
  ///
2108
2152
  /// <ul>
2109
2153
  /// <li>
2110
- /// Typically throws a <code>GSKBarcodeScanFlowError</code>
2154
+ /// A <code>GSKScanFlowError</code>
2111
2155
  /// </li>
2112
2156
  /// </ul>
2113
2157
  ///
@@ -2161,7 +2205,7 @@ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
2161
2205
  /// \endcode
2162
2206
  @property (nonatomic) BOOL isBatchModeEnabled;
2163
2207
  /// The highlight color used for the UI (overlay). Defaults
2164
- /// to <code>.green</code>. For good constrast, we recommend using a bright color.
2208
+ /// to <code>.green</code>. For good contrast, we recommend using a bright color.
2165
2209
  @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
2166
2210
  /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
2167
2211
  /// default color will be used (blue on iOS, for example).
@@ -2182,19 +2226,6 @@ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
2182
2226
  + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2183
2227
  @end
2184
2228
 
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
2229
  /// The result of a barcode scanning flow.
2199
2230
  /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
2200
2231
  /// containing the detected barcode or QR code data.
@@ -2260,7 +2291,7 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
2260
2291
  /// A camera view controller to scan documents or barcodes.
2261
2292
  /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
2262
2293
  /// 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.
2294
+ /// (<code>cameraView.translatesAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
2264
2295
  /// note:
2265
2296
  ///
2266
2297
  /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
@@ -2268,9 +2299,16 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
2268
2299
  /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
2269
2300
  /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
2270
2301
  /// 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>.
2302
+ /// (see <code>hideShutterView(animated:)</code>).
2272
2303
  SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
2273
2304
  @interface GSKCameraViewController : UIViewController
2305
+ /// Requests camera access if needed.
2306
+ /// This returns immediately when access is already determined. It only shows the system prompt
2307
+ /// when access has not been requested yet.
2308
+ ///
2309
+ /// returns:
2310
+ /// <code>true</code> when access is authorized.
2311
+ + (void)requestCameraAccessWithCompletionHandler:(void (^ _Nonnull)(BOOL))completionHandler;
2274
2312
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
2275
2313
  - (void)viewDidLoad;
2276
2314
  - (void)viewWillAppear:(BOOL)animated;
@@ -2434,24 +2472,24 @@ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
2434
2472
  typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
2435
2473
  /// No document present in the image
2436
2474
  GSKDocumentFinderImageTypeNoDocument = 0,
2437
- /// A document present in the image, but no crop, perspective correction have been applied
2475
+ /// A document is present in the image, but no crop or perspective correction has been applied.
2438
2476
  GSKDocumentFinderImageTypeUnwarped = 1,
2439
- /// A document present in the image, and crop, perspective correction have been applied
2477
+ /// A document is present in the image, and crop and perspective correction have been applied.
2440
2478
  GSKDocumentFinderImageTypeWarped = 2,
2441
- /// A document present in the image, crop/perspective correction and
2442
- /// enhanced have been applied.
2479
+ /// A document is present in the image, and crop/perspective correction and
2480
+ /// enhancement have been applied.
2443
2481
  GSKDocumentFinderImageTypeEnhanced = 3,
2444
2482
  };
2445
2483
 
2446
2484
  @class GSKPDFDocument;
2447
2485
  @protocol GSKDocumentImageProcessor;
2448
2486
  @class GSKDocumentGeneratorConfiguration;
2449
- /// This class exposes the capacility to generate a PDF document file.
2487
+ /// This class exposes the capability to generate a PDF or TIFF multi-page document file.
2450
2488
  SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
2451
2489
  @interface GSKDocumentGenerator : NSObject
2452
2490
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
2453
2491
  /// Generates a document file based on a document model and a generator configuration.
2454
- /// \param document The source document to generate as PDF.
2492
+ /// \param document The source document to generate as PDF or TIFF depending on the configuration.
2455
2493
  ///
2456
2494
  /// \param imageProcessor An object used to process each source document’s image before inserting it in the resulting document.
2457
2495
  /// Only used when generating a PDF document
@@ -2460,7 +2498,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
2460
2498
  ///
2461
2499
  - (BOOL)generate:(GSKPDFDocument * _Nonnull)document imageProcessor:(id <GSKDocumentImageProcessor> _Nonnull)imageProcessor configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
2462
2500
  /// Generates a document file based on a document model and a generator configuration.
2463
- /// \param document The source document to generate as PDF.
2501
+ /// \param document The source document to generate as PDF or TIFF depending on the configuration.
2464
2502
  ///
2465
2503
  /// \param configuration The configuration for the document generation.
2466
2504
  ///
@@ -2474,7 +2512,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
2474
2512
  @interface GSKDocumentGeneratorConfiguration : NSObject
2475
2513
  + (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
2476
2514
  + (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
2477
- /// The output file format of the document generator. Must be .pdf or .tif.
2515
+ /// The output file format of the document generator. Must be .pdf or .tiff.
2478
2516
  @property (nonatomic, readonly) enum GSKDocumentGeneratorFileFormat outputFileFormat;
2479
2517
  /// The path where the generated document will be written. The extension will not be validated.
2480
2518
  @property (nonatomic, readonly, copy) NSString * _Nonnull outputFilePath;
@@ -2505,7 +2543,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
2505
2543
 
2506
2544
  SWIFT_CLASS("_TtC5GSSDK38GSKDocumentGeneratorDebugConfiguration")
2507
2545
  @interface GSKDocumentGeneratorDebugConfiguration : NSObject
2508
- /// If true, OCR’ed text will visible on the PDF.
2546
+ /// If true, OCR’ed text will be visible on the PDF.
2509
2547
  /// Defaults to false. Use this for debug only
2510
2548
  @property (nonatomic, readonly) BOOL isOCRTextShownOnPDF;
2511
2549
  - (nonnull instancetype)initWithIsOCRTextShownOnPDF:(BOOL)isOCRTextShownOnPDF OBJC_DESIGNATED_INITIALIZER;
@@ -2551,6 +2589,16 @@ SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
2551
2589
 
2552
2590
  @class UIImage;
2553
2591
  @class UIView;
2592
+ /// A view controller that displays a scanned image with an interactive quadrangle overlay
2593
+ /// for manual cropping and perspective adjustment.
2594
+ /// <code>GSKEditFrameViewController</code> presents an image and allows the user to refine the detected
2595
+ /// document boundaries by dragging the quadrangle’s corner handles. As the user edits the
2596
+ /// quadrangle, changes are reflected in the <code>quadrangle</code> property, which is Key-Value
2597
+ /// Observing (KVO) compliant.
2598
+ /// The overlay’s appearance—including colors, handle size, transparency, and magnifier
2599
+ /// behavior—can be customized through the exposed properties. This view controller is
2600
+ /// typically used after automatic document detection, to let the user fine-tune the crop
2601
+ /// before further processing (such as perspective correction or export).
2554
2602
  SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2555
2603
  @interface GSKEditFrameViewController : UIViewController
2556
2604
  /// The image on which the quadrangle is overlaid.
@@ -2558,6 +2606,10 @@ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2558
2606
  @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
2559
2607
  /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
2560
2608
  @property (nonatomic, strong) GSKQuadrangle * _Nonnull quadrangle;
2609
+ /// Insets applied around the image.
2610
+ /// By default this matches half the quadrangle overlay handle width, so handles remain visible even when
2611
+ /// the corners are on the edge of the image.
2612
+ @property (nonatomic) CGFloat inset;
2561
2613
  /// Customize the color of the shade within the quadrangle.
2562
2614
  @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
2563
2615
  /// Customize the color of the shade outside the quadrangle.
@@ -2566,6 +2618,8 @@ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2566
2618
  @property (nonatomic, strong) UIColor * _Nonnull lineColor;
2567
2619
  /// Customize the width of the corner handles.
2568
2620
  @property (nonatomic) CGFloat handleWidth;
2621
+ /// Customize the transparency of the entire overlay
2622
+ @property (nonatomic) CGFloat overlayAlpha;
2569
2623
  /// Customize the magnifier center style shown while dragging corners.
2570
2624
  @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
2571
2625
  /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
@@ -2789,14 +2843,14 @@ SWIFT_CLASS("_TtC5GSSDK6GSKOCR")
2789
2843
  /// The OCR decides what post-processing to apply for the best results.
2790
2844
  ///
2791
2845
  /// \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.
2846
+ /// performed. Note that you must provide the appropriate trained data.
2793
2847
  ///
2794
2848
  /// \param progressBlock The progress between 0 and 1. Called on the same thread.
2795
2849
  ///
2796
2850
  ///
2797
2851
  /// returns:
2798
2852
  /// 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;
2853
+ - (void)recognizeTextForImageAtPath:(NSString * _Nonnull)imagePath configuration:(GSKOCRConfiguration * _Nonnull)configuration onProgress:(void (^ _Nullable)(float))progressBlock completionHandler:(void (^ _Nonnull)(GSKOCRResult * _Nullable, NSError * _Nullable))completionHandler;
2800
2854
  @end
2801
2855
 
2802
2856
  /// The configuration for an OCR operation.
@@ -2902,9 +2956,15 @@ SWIFT_CLASS("_TtC5GSSDK13GSKReceiptVAT")
2902
2956
  @end
2903
2957
 
2904
2958
  @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.
2959
+ /// A UI-driven scan flow for turning physical documents into processed digital pages.
2960
+ /// Create an instance with <code>GSKScanFlowConfiguration</code> to choose the source
2961
+ /// (camera, photo library, or image URL), multi-page behavior, output format,
2962
+ /// filters, OCR, and structured-data extraction. Present the flow from a view
2963
+ /// controller and await a <code>GSKScanFlowResult</code> with the captured pages and the
2964
+ /// optional multi-page document.
2965
+ /// important:
2966
+ /// If you start a scan flow with the camera, your app must declare the
2967
+ /// <code>NSCameraUsageDescription</code> key in <code>Info.plist</code>.
2908
2968
  SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
2909
2969
  @interface GSKScanFlow : NSObject
2910
2970
  - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
@@ -3023,15 +3083,33 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
3023
3083
  + (nullable instancetype)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
3024
3084
  @end
3025
3085
 
3026
- /// Enum that defines various errors that can occur during a scan flow.
3027
- typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
3086
+ /// Enum that defines various numeric error codes that can occur during a scan flow.
3087
+ typedef SWIFT_ENUM(NSInteger, GSKScanFlowErrorCode, open) {
3028
3088
  /// 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
3089
+ GSKScanFlowCancellationErrorCode SWIFT_COMPILE_NAME("cancellation") = 999,
3090
+ /// A general error due to an incorrect configuration. Verify that your
3031
3091
  /// inputs match the API requirements.
3032
- GSKScanFlowBadInputError SWIFT_COMPILE_NAME("badInput") = 1000,
3092
+ GSKScanFlowConfigurationErrorCode SWIFT_COMPILE_NAME("configuration") = 1000,
3093
+ /// A licensing error. This is a developer error and you should contact the
3094
+ /// Genius Scan SDK support team to make sure you have a valid license key.
3095
+ GSKScanFlowLicensingErrorCode SWIFT_COMPILE_NAME("licensing") = 1001,
3096
+ /// An error that happened while capturing the scans. This can sometimes be recovered
3097
+ /// by restarting the device.
3098
+ GSKScanFlowCaptureErrorCode SWIFT_COMPILE_NAME("capture") = 1002,
3099
+ /// An error caused by low storage space. This can be recovered by cleaning up
3100
+ /// storage space and trying again.
3101
+ GSKScanFlowStorageSpaceErrorCode SWIFT_COMPILE_NAME("storageSpace") = 1003,
3102
+ /// An internal error. This is a catch-all category, and the underlying error will
3103
+ /// give more details.
3104
+ GSKScanFlowInternalErrorCode SWIFT_COMPILE_NAME("internal") = 9999,
3033
3105
  };
3034
3106
 
3107
+ SWIFT_CLASS("_TtC5GSSDK26GSKScanFlowErrorCodeBridge")
3108
+ @interface GSKScanFlowErrorCodeBridge : NSObject
3109
+ + (NSString * _Nonnull)stringCodeForRawValue:(NSInteger)rawValue SWIFT_WARN_UNUSED_RESULT;
3110
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3111
+ @end
3112
+
3035
3113
  /// The different possible filters for the scanner UI.
3036
3114
  /// Each case maps to a predefined filter configuration except <code>.automatic</code>.
3037
3115
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
@@ -3074,8 +3152,8 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowFlashMode, open) {
3074
3152
  /// The format of the exported document.
3075
3153
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowMultiPageFormat, open) {
3076
3154
  GSKScanFlowNone SWIFT_COMPILE_NAME("none") = 0,
3077
- GSKScanFlowPDF SWIFT_COMPILE_NAME("PDF") = 1,
3078
- GSKScanFlowTIFF SWIFT_COMPILE_NAME("TIFF") = 2,
3155
+ GSKScanFlowPDF SWIFT_COMPILE_NAME("pdf") = 1,
3156
+ GSKScanFlowTIFF SWIFT_COMPILE_NAME("tiff") = 2,
3079
3157
  };
3080
3158
 
3081
3159
  /// The configuration for text recognition
@@ -3114,9 +3192,9 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
3114
3192
  SWIFT_CLASS("_TtC5GSSDK17GSKScanFlowResult")
3115
3193
  @interface GSKScanFlowResult : NSObject
3116
3194
  /// 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.
3195
+ /// flow. The format is specified by the <code>multiPageFormat</code> property of
3196
+ /// the <code>GSKScanFlowConfiguration</code> used for the scan flow. This is <code>nil</code>
3197
+ /// when <code>multiPageFormat</code> is <code>.none</code> or if document generation failed.
3120
3198
  @property (nonatomic, copy) NSURL * _Nullable multiPageDocumentURL;
3121
3199
  /// The individual scans taken during the scan flow.
3122
3200
  /// Each scan object contains both the original and the enhanced scans.
@@ -3320,23 +3398,19 @@ SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
3320
3398
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3321
3399
  @end
3322
3400
 
3323
- @class GSKTextLayoutToTextConverterResult;
3401
+ /// Converts an OCR text layout into plain text.
3402
+ /// A <code>GSKOCRResult</code> contains both raw text and a <code>GSKTextLayout</code>, which preserves spatial information such as
3403
+ /// bounding boxes and line/word positions. This converter reconstructs the raw text from a <code>GSKTextLayout</code> by
3404
+ /// traversing its bounding boxes in reading order and grouping content into paragraphs.
3405
+ /// Use this when you want to retain only the spatial representation (for highlighting, selection, reflow, etc.)
3406
+ /// and regenerate the plain-text representation on demand, rather than storing both.
3324
3407
  SWIFT_CLASS("_TtC5GSSDK28GSKTextLayoutToTextConverter")
3325
3408
  @interface GSKTextLayoutToTextConverter : NSObject
3326
- - (GSKTextLayoutToTextConverterResult * _Nullable)convert:(GSKTextLayout * _Nonnull)textLayout error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
3327
3409
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3328
3410
  @end
3329
3411
 
3330
3412
  SWIFT_CLASS("_TtC5GSSDK34GSKTextLayoutToTextConverterResult")
3331
3413
  @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
3414
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
3341
3415
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
3342
3416
  @end