@thegrizzlylabs/react-native-genius-scan 5.17.3 → 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 (120) hide show
  1. package/README.md +4 -4
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/com/geniusscansdk/reactnative/RNGeniusScanModule.java +12 -10
  4. package/index.d.ts +7 -7
  5. package/index.js +1 -1
  6. package/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Assets.car +0 -0
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/DeviceList.plist +0 -0
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/PrivacyInfo.xcprivacy +34 -0
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDefaultLogLevel.h +1 -1
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +0 -8
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKError.h +7 -3
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLog.h +1 -1
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLogger.h +1 -1
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKProcessingResult.h +0 -4
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKReadabilityResult.h +1 -1
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKRotation.h +5 -1
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +2 -2
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +6 -5
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +459 -344
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +0 -6
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/UIImage+GSKUtils.h +12 -3
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +19923 -17290
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +334 -279
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +334 -279
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
  38. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
  44. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
  45. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
  46. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
  47. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
  48. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
  49. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
  50. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
  51. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Assets.car +0 -0
  52. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/DeviceList.plist +0 -0
  53. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  54. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/PrivacyInfo.xcprivacy +34 -0
  55. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  56. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDefaultLogLevel.h +1 -1
  57. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
  58. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +0 -8
  59. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKError.h +7 -3
  60. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLog.h +1 -1
  61. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLogger.h +1 -1
  62. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKProcessingResult.h +0 -4
  63. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
  64. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKReadabilityResult.h +1 -1
  65. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKRotation.h +5 -1
  66. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +2 -2
  67. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +6 -5
  68. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +932 -702
  69. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +0 -6
  70. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/UIImage+GSKUtils.h +12 -3
  71. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  72. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +19923 -17290
  73. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +334 -279
  74. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  75. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +334 -279
  76. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +19923 -17290
  77. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +334 -279
  78. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  79. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +334 -279
  80. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
  81. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
  82. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
  83. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
  84. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  85. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
  86. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
  87. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
  88. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
  89. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
  90. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
  91. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
  92. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
  93. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
  94. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
  95. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
  96. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
  97. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
  98. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
  99. package/ios/RNGeniusScan.m +8 -8
  100. package/package.json +1 -1
  101. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditFrameView.h +0 -71
  102. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditFrameViewController.h +0 -62
  103. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditableFrame.h +0 -68
  104. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterType.h +0 -43
  105. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  106. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKShutterView.h +0 -28
  107. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKView.h +0 -70
  108. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/png.h +0 -3358
  109. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pngconf.h +0 -615
  110. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pnglibconf.h +0 -233
  111. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditFrameView.h +0 -71
  112. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditFrameViewController.h +0 -62
  113. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditableFrame.h +0 -68
  114. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterType.h +0 -43
  115. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  116. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKShutterView.h +0 -28
  117. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKView.h +0 -70
  118. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/png.h +0 -3358
  119. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/pngconf.h +0 -615
  120. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/pnglibconf.h +0 -233
@@ -281,9 +281,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
281
281
  #if __has_warning("-Watimport-in-framework-header")
282
282
  #pragma clang diagnostic ignored "-Watimport-in-framework-header"
283
283
  #endif
284
- @import AVFoundation;
285
284
  @import CoreFoundation;
286
- @import CoreGraphics;
287
285
  @import Dispatch;
288
286
  @import Foundation;
289
287
  @import ObjectiveC;
@@ -312,14 +310,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
312
310
 
313
311
  #if defined(__OBJC__)
314
312
 
315
- SWIFT_PROTOCOL("_TtP5GSSDK20CGImageRepresentable_")
316
- @protocol CGImageRepresentable
317
- - (CGImageRef _Nullable)CGImageRepresentation SWIFT_WARN_UNUSED_RESULT;
318
- @end
319
-
320
- @interface AVCapturePhoto (SWIFT_EXTENSION(GSSDK)) <CGImageRepresentable>
321
- @end
322
-
323
313
  @class NSString;
324
314
  /// Entry point of the SDK. Use this to initialize the SDK with your license key.
325
315
  SWIFT_CLASS("_TtC5GSSDK3GSK")
@@ -351,96 +341,212 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _No
351
341
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
352
342
  @end
353
343
 
354
- @class AVCaptureDevice;
355
- @class AVCaptureSession;
356
- enum GSKCameraSessionFlashStatus : NSInteger;
357
- enum GSKCameraSessionDocumentDetection : NSInteger;
358
- @class GSKCameraSessionConfiguration;
359
- SWIFT_CLASS("_TtC5GSSDK16GSKCameraSession")
360
- @interface GSKCameraSession : NSObject
361
- /// Minimum duration in <code>.aboutToTrigger</code> state before triggering the photo.
362
- /// This can be used to coordinate animations.
363
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDurationInAboutToTriggerForTrigger;)
364
- + (NSTimeInterval)minDurationInAboutToTriggerForTrigger SWIFT_WARN_UNUSED_RESULT;
365
- /// Public for legacy reasons, not to be used directly.
366
- @property (nonatomic, strong) AVCaptureDevice * _Nullable captureDevice;
367
- /// Public for legacy reasons, not to be used directly.
368
- @property (nonatomic, strong) AVCaptureSession * _Nullable captureSession;
369
- /// The flash mode. Default is .auto.
370
- @property (nonatomic) enum GSKCameraSessionFlashStatus flashStatus;
371
- /// Returns the current status of the document detection.
372
- /// This is a computed property that maps to the new activeDetectionMode property for backward compatibility.
373
- /// Observable.
344
+ /// A barcode such as 1D barcodes or QR codes.
345
+ SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
346
+ @interface GSKBarcode : NSObject
347
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
348
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
349
+ @end
350
+
351
+ @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
352
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
353
+ @end
354
+
355
+ @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
356
+ @property (nonatomic, readonly) NSUInteger hash;
357
+ @end
358
+
359
+ @class GSKBarcodeScanFlowConfiguration;
360
+ @class UIViewController;
361
+ @class GSKBarcodeScanFlowResult;
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.
374
367
  /// important:
375
- /// This property is deprecated. Use <code>activeDetectionMode</code> instead, which supports both document and readable
376
- /// code detection modes.
377
- @property (nonatomic) enum GSKCameraSessionDocumentDetection activeDocumentDetection SWIFT_DEPRECATED_MSG("Use activeDetectionMode instead");
378
- /// True for the duration of taking the photo and processing it. Observable.
379
- @property (nonatomic, readonly) BOOL isTakingPhoto;
380
- /// Returns false if flash isn’t supported on this device configuration.
381
- @property (nonatomic, readonly) BOOL supportsFlash;
382
- /// Public to be accessible from Objective-C, but should be private otherwise.
383
- @property (nonatomic, readonly, strong) dispatch_queue_t _Nullable captureSessionQueue;
384
- @property (nonatomic, readonly, strong) dispatch_queue_t _Nonnull takePhotoQueue;
385
- - (nonnull instancetype)initWithConfiguration:(GSKCameraSessionConfiguration * _Nonnull)configuration;
386
- - (void)pauseSession;
387
- - (void)resumeSession;
368
+ /// Camera access requires <code>NSCameraUsageDescription</code> in
369
+ /// <code>Info.plist</code>.
370
+ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
371
+ @interface GSKBarcodeScanFlow : NSObject
372
+ /// Initializes a new barcode scan flow
373
+ /// \param configuration Configuration for the barcode scanning
374
+ ///
375
+ - (nonnull instancetype)initWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
376
+ /// Starts the barcode scanning flow by presenting a full-screen camera interface.
377
+ /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
378
+ /// The scanning process respects the code types specified in the flow’s configuration.
379
+ /// The method uses Swift’s async/await pattern, suspending until either:
380
+ /// <ul>
381
+ /// <li>
382
+ /// A barcode is successfully detected (except in batch mode)
383
+ /// </li>
384
+ /// <li>
385
+ /// The user taps the done button (batch mode)
386
+ /// </li>
387
+ /// <li>
388
+ /// The user cancels the operation
389
+ /// </li>
390
+ /// <li>
391
+ /// An error occurs during setup or scanning
392
+ /// </li>
393
+ /// </ul>
394
+ /// The behavior varies based on the configuration’s isBatchModeEnabled:
395
+ /// <ul>
396
+ /// <li>
397
+ /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
398
+ /// </li>
399
+ /// <li>
400
+ /// <code>true</code>: Collects unique codes over time until the user taps the done button
401
+ /// </li>
402
+ /// </ul>
403
+ /// Example usage:
404
+ /// \code
405
+ /// let flow = GSKBarcodeScanFlow()
406
+ /// do {
407
+ /// let result = try await flow.resultByStarting(fromViewController: self)
408
+ /// print("Scanned codes: \(result.barcodes.map { $0.value })")
409
+ /// } catch GSKScanFlowError.cancellation {
410
+ /// print("User canceled scanning")
411
+ /// } catch {
412
+ /// print("Scanning failed: \(error)")
413
+ /// }
414
+ ///
415
+ /// \endcodeimportant:
416
+ /// This method requires camera permissions. Ensure your app’s Info.plist includes
417
+ /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
418
+ /// note:
419
+ /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
420
+ /// for an immersive scanning experience.
421
+ /// \param viewController The view controller from which to present the camera interface.
422
+ /// This should typically be the currently visible view controller.
423
+ ///
424
+ ///
425
+ /// throws:
426
+ ///
427
+ /// <ul>
428
+ /// <li>
429
+ /// A <code>GSKScanFlowError</code>
430
+ /// </li>
431
+ /// </ul>
432
+ ///
433
+ /// returns:
434
+ /// A <code>GSKBarcodeScanFlowResult</code> containing the detected barcodes with their
435
+ /// decoded values and format types.
436
+ - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
388
437
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
389
438
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
390
439
  @end
391
440
 
392
- @class AVCaptureMetadataOutput;
393
- @class AVMetadataObject;
394
- @class AVCaptureConnection;
395
- @interface GSKCameraSession (SWIFT_EXTENSION(GSSDK)) <AVCaptureMetadataOutputObjectsDelegate>
396
- - (void)captureOutput:(AVCaptureMetadataOutput * _Nonnull)output didOutputMetadataObjects:(NSArray<AVMetadataObject *> * _Nonnull)metadataObjects fromConnection:(AVCaptureConnection * _Nonnull)connection;
441
+ @class NSError;
442
+ @interface GSKBarcodeScanFlow (SWIFT_EXTENSION(GSSDK))
443
+ /// Instantiates a <code>GSKBarcodeScanFlow</code> instance with the provided configuration.
444
+ /// This initializer is only available from Objective-C.
445
+ + (nonnull instancetype)barcodeScanFlowWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
446
+ /// Starts the barcode scanning flow.
447
+ /// @param viewController The view controller to present the barcode scanning interface from.
448
+ /// @param successBlock A completion block/closure that will be called on the main
449
+ /// thread upon successful completion of the scan flow. It receives a <code>GSKBarcodeScanFlowResult</code> object as
450
+ /// a parameter. This object gives you access to the scanned codes.
451
+ /// @param failureBlock A block/closure called if an error was encountered.
452
+ /// This method is only available from Objective-C.
453
+ - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
397
454
  @end
398
455
 
399
- @interface GSKCameraSession (SWIFT_EXTENSION(GSSDK))
400
- /// Manually take a photo
401
- /// If autoTriggerEnabled is true, the photo is taken automatically when the frame is detected.
402
- /// Otherwise, if you want to let the user manually trigger the photo, you can use this method.
403
- /// This method can be called even when activeDetectionMode is higlightAndTrigger and will force taking the
404
- /// photo.
405
- /// This method is thread-safe.
406
- /// IMPORTANT: Taking the photo will pause the session. You have to resume the session will <code>resumeSession</code> once
407
- /// you are done processing the result.
408
- - (void)takePhoto;
456
+ @class UIColor;
457
+ /// Configuration for the UI barcode scanning flow
458
+ /// This class allows customization of which barcode and QR code formats should be detected
459
+ /// during the scanning process. By default, all supported formats are enabled.
460
+ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
461
+ @interface GSKBarcodeScanFlowConfiguration : NSObject
462
+ /// Whether batch mode is enabled for code detection.
463
+ /// This setting controls how codes are detected and when they are returned:
464
+ /// <ul>
465
+ /// <li>
466
+ /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
467
+ /// </li>
468
+ /// <li>
469
+ /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
470
+ /// </li>
471
+ /// </ul>
472
+ /// Example:
473
+ /// \code
474
+ /// // Standard mode - return codes immediately (default)
475
+ /// let standardConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: false)
476
+ ///
477
+ /// // Batch mode - collect codes over time
478
+ /// let batchConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: true)
479
+ ///
480
+ /// \endcode
481
+ @property (nonatomic) BOOL isBatchModeEnabled;
482
+ /// The highlight color used for the UI (overlay). Defaults
483
+ /// to <code>.green</code>. For good contrast, we recommend using a bright color.
484
+ @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
485
+ /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
486
+ /// default color will be used (blue on iOS, for example).
487
+ @property (nonatomic, strong) UIColor * _Nullable menuColor;
488
+ /// Creates a new barcode scan flow configuration with default values
489
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
409
490
  @end
410
491
 
411
- @class AVCapturePhotoOutput;
412
- @class AVCaptureResolvedPhotoSettings;
413
- @interface GSKCameraSession (SWIFT_EXTENSION(GSSDK)) <AVCapturePhotoCaptureDelegate>
414
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output willBeginCaptureForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings;
415
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output willCapturePhotoForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings;
416
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output didCapturePhotoForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings;
417
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output didFinishProcessingPhoto:(AVCapturePhoto * _Nonnull)photo error:(NSError * _Nullable)error;
418
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output didFinishCaptureForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings error:(NSError * _Nullable)error;
492
+ @class NSDictionary;
493
+ @interface GSKBarcodeScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
494
+ /// Create a configuration from a dictionary.
495
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
496
+ /// be used in native projects.
497
+ + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
498
+ /// Create a configuration from JSON data.
499
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
500
+ /// be used in native projects.
501
+ + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
419
502
  @end
420
503
 
421
- /// The configuration for a camera session.
422
- SWIFT_CLASS("_TtC5GSSDK29GSKCameraSessionConfiguration")
423
- @interface GSKCameraSessionConfiguration : NSObject
424
- /// note:
425
- /// Deprecated in favor of <code>init(detectionMode:)</code> which allows for more flexible detection modes.
426
- /// \param documentDetection The type of real-time document detection to apply.
504
+ /// The result of a barcode scanning flow.
505
+ /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
506
+ /// containing the detected barcode or QR code data.
507
+ SWIFT_CLASS("_TtC5GSSDK24GSKBarcodeScanFlowResult")
508
+ @interface GSKBarcodeScanFlowResult : NSObject
509
+ /// The detected barcodes containing their decoded values and types.
510
+ /// This property provides access to an array of detected codes, each containing
511
+ /// both the string content and format type (e.g., QR code, Code 128, EAN-13, etc.).
512
+ /// <ul>
513
+ /// <li>
514
+ /// For standard mode: Contains all codes detected in a single frame
515
+ /// </li>
516
+ /// <li>
517
+ /// For batch mode: Contains all codes collected over the scanning session
518
+ /// </li>
519
+ /// </ul>
520
+ @property (nonatomic, readonly, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
521
+ /// Creates a new barcode scan flow result.
522
+ /// \param barcodes The detected barcodes.
427
523
  ///
428
- - (nonnull instancetype)initWithDocumentDetection:(enum GSKCameraSessionDocumentDetection)documentDetection OBJC_DESIGNATED_INITIALIZER SWIFT_DEPRECATED_MSG("Use init(detectionMode:) instead");
429
- /// A session configuration where the document detection is <code>.highlightAndAutoCapture</code>
430
- - (nonnull instancetype)init;
524
+ - (nonnull instancetype)initWithBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes OBJC_DESIGNATED_INITIALIZER;
525
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
526
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
431
527
  @end
432
528
 
433
- /// The style of document detection to be used during a camera session.
434
- typedef SWIFT_ENUM(NSInteger, GSKCameraSessionDocumentDetection, open) {
435
- /// The session doesn’t attempt to detect documents.
436
- GSKCameraSessionDocumentDetectionNone = 0,
437
- /// The session detects documents and produces quadrangles
438
- /// to be used for highlighting the document in the video frames.
439
- GSKCameraSessionDocumentDetectionHighlight = 1,
440
- /// The session detects documents and snaps the photo when
441
- /// the detection is stable.
442
- GSKCameraSessionDocumentDetectionHighlightAndTrigger = 2,
443
- };
529
+ @interface GSKBarcodeScanFlowResult (SWIFT_EXTENSION(GSSDK))
530
+ /// Returns a dictionary representation of the result
531
+ /// The dictionary contains:
532
+ /// <ul>
533
+ /// <li>
534
+ /// barcodes: An array of code dictionaries, each containing:
535
+ /// <ul>
536
+ /// <li>
537
+ /// value: The decoded string value
538
+ /// </li>
539
+ /// <li>
540
+ /// type: The code type as a string (e.g., “qr”, “code128”)
541
+ /// </li>
542
+ /// </ul>
543
+ /// </li>
544
+ /// </ul>
545
+ @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
546
+ /// Returns a JSON representation of the result.
547
+ /// See <code>dictionary</code> for an explanation of the JSON data’s structure.
548
+ - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
549
+ @end
444
550
 
445
551
  /// Represents an error raised by the camera session
446
552
  typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
@@ -455,83 +561,210 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
455
561
  GSKCameraSessionErrorWarnLockDevice = -1003,
456
562
  };
457
563
 
458
- typedef SWIFT_ENUM(NSInteger, GSKCameraSessionFlashStatus, open) {
459
- GSKCameraSessionFlashStatusAuto = 0,
460
- GSKCameraSessionFlashStatusOn = 1,
461
- GSKCameraSessionFlashStatusOff = 2,
462
- };
463
-
464
564
  @class NSCoder;
465
- @protocol UIViewControllerTransitionCoordinator;
466
565
  @class NSBundle;
467
- /// A ready-to-use camera interface for scanning documents.
566
+ /// A camera view controller to scan documents or barcodes.
567
+ /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
568
+ /// By default, <code>cameraView</code> fills the entire screen. You can disable its resizing mask
569
+ /// (<code>cameraView.translatesAutoresizingMaskIntoConstraints</code>) and use Auto Layout constraints.
570
+ /// note:
571
+ ///
572
+ /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
573
+ /// and a delegate callback (<code>cameraViewController(_:didGenerateScan:)</code>) is called when the photo is ready.
574
+ /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
575
+ /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
576
+ /// you will need to resume the camera session (see <code>resume()</code>). You also need to “reveal” the shutter screen
577
+ /// (see <code>hideShutterView(animated:)</code>).
468
578
  SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
469
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;
470
587
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
471
- - (nonnull instancetype)initWithCameraSession:(GSKCameraSession * _Nonnull)cameraSession OBJC_DESIGNATED_INITIALIZER;
472
- @property (nonatomic, readonly) BOOL prefersStatusBarHidden;
473
- - (void)loadView;
474
588
  - (void)viewDidLoad;
475
589
  - (void)viewWillAppear:(BOOL)animated;
476
590
  - (void)viewWillDisappear:(BOOL)animated;
477
- - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator> _Nonnull)coordinator;
591
+ /// Manually trigger a photo.
592
+ /// Use this to handle the user tapping on a “take photo” button, or your own
593
+ /// custom logic to take a photo.
594
+ - (void)takePhoto;
478
595
  - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
479
596
  @end
480
597
 
481
- @class GSKView;
482
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK)) <GSKViewDelegate>
483
- - (void)cameraView:(GSKView * _Nonnull)cameraView requestedFocusAtPoint:(CGPoint)focusPoint;
598
+ @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
484
599
  @end
485
600
 
601
+ /// A document detection mode
602
+ /// When detecting a document, the camera controller can just highlight the document, or also
603
+ /// highlight and trigger the photo when the detection is stable enough.
604
+ typedef SWIFT_ENUM(NSInteger, DocumentDetectionMode, open) {
605
+ /// Visual highlighting only.
606
+ /// The camera will detect document edges and provide visual feedback by drawing
607
+ /// a document overlay, but will not automatically capture photos. Users must
608
+ /// manually trigger photo capture.
609
+ DocumentDetectionModeHighlightOnly = 0,
610
+ /// Highlighting with automatic capture.
611
+ /// Similar to <code>highlightOnly</code>, but the camera will automatically take a photo
612
+ /// when a stable document is detected for a sufficient duration. This provides
613
+ /// a hands-free scanning experience.
614
+ DocumentDetectionModeHighlightAndAutoCapture = 1,
615
+ };
616
+
486
617
  @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
487
- /// Snap the photo
488
- - (void)takePhoto;
489
618
  @end
490
619
 
491
- @class GSKScan;
492
- @class GSKQuadrangle;
620
+ /// Constants indicating an interruption reason for the camera session.
621
+ typedef SWIFT_ENUM(NSInteger, InterruptionReason, open) {
622
+ /// An interruption caused by the app being sent to the background while using a camera.
623
+ InterruptionReasonVideoDeviceNotAvailableInBackground = 0,
624
+ /// An interruption caused by the audio hardware temporarily being made unavailable, for instance,
625
+ /// for a phone call, or alarm.
626
+ InterruptionReasonAudioDeviceInUseByAnotherClient = 1,
627
+ /// An interruption caused by the video device temporarily being made unavailable, for instance,
628
+ /// when stolen away by another app.
629
+ InterruptionReasonVideoDeviceInUseByAnotherClient = 2,
630
+ /// An interruption caused when the app is running in a multi-app layout, causing resource contention
631
+ /// and degraded recording quality of service. Given your present session configuration, the
632
+ /// session may only be run if your app occupies the full screen.
633
+ InterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps = 3,
634
+ /// An interruption caused by the video device temporarily being made unavailable due to system pressure,
635
+ /// such as thermal duress.
636
+ InterruptionReasonVideoDeviceNotAvailableDueToSystemPressure = 4,
637
+ InterruptionReasonUnknown = 5,
638
+ };
639
+
493
640
  @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
494
- - (void)cameraSessionDidSetup:(GSKCameraSession * _Nonnull)cameraSession;
495
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession setupFailedWithError:(NSError * _Nonnull)error;
496
- - (void)cameraSessionWillSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
497
- - (void)cameraSessionDidSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
498
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFailToSnapPhotoWithError:(NSError * _Nonnull)error;
499
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didGenerateScan:(GSKScan * _Nonnull)scan;
500
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didEncounterFailureWithError:(NSError * _Nonnull)error;
501
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFailWithError:(NSError * _Nonnull)error;
502
- - (void)cameraSessionIsSearchingQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
503
- - (void)cameraSessionIsAboutToChooseQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
504
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession willAutoTriggerWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
505
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFindQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
506
- - (void)cameraSessionFailedToFindQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
507
- - (void)cameraSessionDidStart:(GSKCameraSession * _Nonnull)cameraSession;
508
- - (void)cameraSessionDidStop:(GSKCameraSession * _Nonnull)cameraSession;
509
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession wasInterruptedWithReason:(enum AVCaptureSessionInterruptionReason)reason;
510
- - (void)cameraSessionInterruptionEnded:(GSKCameraSession * _Nonnull)cameraSession;
641
+ /// Factory method for a camera view controller with document detection.
642
+ /// This is only to be used from Objective-C. From Swift, prefer using <code>init(configuration:)</code> instead.
643
+ /// \param documentDetectionMode The document detection mode.
644
+ ///
645
+ /// \param documentOverlayColor The color of the document overlay.
646
+ ///
647
+ + (void)makeCameraViewControllerWithDocumentDetectionMode:(enum DocumentDetectionMode)documentDetectionMode documentOverlayColor:(UIColor * _Nonnull)documentOverlayColor completionHandler:(void (^ _Nonnull)(GSKCameraViewController * _Nullable, NSError * _Nullable))completionHandler;
648
+ @end
649
+
650
+ @class GSKQuadrangle;
651
+ @class GSKScan;
652
+ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
653
+ @protocol GSKCameraViewControllerDelegate
654
+ @optional
655
+ /// The camera view controller failed with an error.
656
+ /// \param cameraViewController The camera view controller
657
+ ///
658
+ /// \param error The encountered error.
659
+ ///
660
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFailWithError:(NSError * _Nonnull)error;
661
+ /// The camera view controller encountered a non-fatal error.
662
+ /// \param cameraViewController The camera view controller
663
+ ///
664
+ /// \param error The encountered error.
665
+ ///
666
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didEncounterNonCriticalError:(NSError * _Nonnull)error;
667
+ /// The camera view controller started running
668
+ /// \param cameraViewController The camera view controller
669
+ ///
670
+ - (void)cameraViewControllerDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
671
+ /// The camera view controller stopped running
672
+ /// \param cameraViewController The camera view controller
673
+ ///
674
+ - (void)cameraViewControllerDidStop:(GSKCameraViewController * _Nonnull)cameraViewController;
675
+ /// The camera view controller was interrupted.
676
+ /// This can happen in various cases, including when the user goes to Split View mode on iPad.
677
+ /// \param cameraViewController The camera view controller
678
+ ///
679
+ /// \param reason The reason why the camera view controller was interrupted.
680
+ ///
681
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController wasInterruptedWithReason:(enum InterruptionReason)reason;
682
+ /// The camera view controller resumes after interruption
683
+ /// \param cameraViewController The camera view controller
684
+ ///
685
+ - (void)cameraViewControllerInterruptionDidEnd:(GSKCameraViewController * _Nonnull)cameraViewController;
686
+ /// The camera view controller is still looking for a quadrangle.
687
+ /// This is a general notification about the status of the search: we may or may not have identified
688
+ /// its edges. If you want to act on identified edges, listen to the <code>cameraViewController:didFindDocumentWithQuadrangle:</code>
689
+ /// delegate method.
690
+ /// <ul>
691
+ /// <li>
692
+ /// Parameters:
693
+ /// </li>
694
+ /// <li>
695
+ /// cameraViewController: The camera view controller
696
+ /// </li>
697
+ /// </ul>
698
+ - (void)cameraViewControllerIsSearchingForDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
699
+ /// The camera view controller identified a document in the last frame of the photo stream
700
+ /// \param cameraViewController The camera view controller
701
+ ///
702
+ /// \param quadrangle The quadrangle of the document that has been found.
703
+ ///
704
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
705
+ /// The camera view controller couldn’t identify a document in the last frame of the photo stream.
706
+ /// This doesn’t mean that the camera view controller has stopped searching for documents or failed.
707
+ /// It just means no document has been identified. In this case, you want to clear any overlay.
708
+ /// \param cameraViewController The camera view controller
709
+ ///
710
+ - (void)cameraViewControllerFailedToFindDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
711
+ /// The camera view controller real-time document detection will soon take the photo of a quadrangle, but if the document
712
+ /// detection is not stable enough, the process can still be
713
+ /// cancelled.
714
+ /// It’s a good time to tell the user to remain stable.
715
+ /// Only called when the document detection is set to .highlightAndAutoCapture.
716
+ /// \param cameraViewController The camera view controller
717
+ ///
718
+ - (void)cameraViewControllerPhotoStabilizationDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
719
+ /// The camera view controller is going to automatically take a photo because the detection was stable enough.
720
+ /// The photo taking is underway and cannot be interrupted at this stage.
721
+ /// \param cameraViewController The camera view controller
722
+ ///
723
+ /// \param quadrangle The quadrangle of the document that will be photographed.
724
+ ///
725
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willSnapPhotoWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
726
+ /// The camera view controller just took a photo, but it hasn’t been post-processed it yet
727
+ /// \param cameraViewController The camera view controller
728
+ ///
729
+ - (void)cameraViewControllerDidSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
730
+ /// The camera view controller has finished processing the photo we just took.
731
+ /// \param cameraViewController The camera view controller
732
+ ///
733
+ /// \param scan The scan object that has been generated. The image contained in the scan object is the full,
734
+ /// unprocessed image in which the document was detected. Use <code>GSKScanProcessor</code> to process and
735
+ /// warp and enhance the scanned document.
736
+ ///
737
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didGenerateScan:(GSKScan * _Nonnull)scan;
738
+ /// Camera view controller has detected barcodes.
739
+ /// \param cameraViewController The camera view controller
740
+ ///
741
+ /// \param barcodes The detected barcodes
742
+ ///
743
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes;
511
744
  @end
512
745
 
513
746
  /// The type of document detected by the document finder.
514
747
  typedef SWIFT_ENUM(NSInteger, GSKDocumentFinderImageType, closed) {
515
748
  /// No document present in the image
516
749
  GSKDocumentFinderImageTypeNoDocument = 0,
517
- /// 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.
518
751
  GSKDocumentFinderImageTypeUnwarped = 1,
519
- /// 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.
520
753
  GSKDocumentFinderImageTypeWarped = 2,
521
- /// A document present in the image, crop/perspective correction and
522
- /// enhanced have been applied.
754
+ /// A document is present in the image, and crop/perspective correction and
755
+ /// enhancement have been applied.
523
756
  GSKDocumentFinderImageTypeEnhanced = 3,
524
757
  };
525
758
 
526
759
  @class GSKPDFDocument;
527
760
  @protocol GSKDocumentImageProcessor;
528
761
  @class GSKDocumentGeneratorConfiguration;
529
- /// 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.
530
763
  SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
531
764
  @interface GSKDocumentGenerator : NSObject
532
765
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
533
766
  /// Generates a document file based on a document model and a generator configuration.
534
- /// \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.
535
768
  ///
536
769
  /// \param imageProcessor An object used to process each source document’s image before inserting it in the resulting document.
537
770
  /// Only used when generating a PDF document
@@ -540,7 +773,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKDocumentGenerator")
540
773
  ///
541
774
  - (BOOL)generate:(GSKPDFDocument * _Nonnull)document imageProcessor:(id <GSKDocumentImageProcessor> _Nonnull)imageProcessor configuration:(GSKDocumentGeneratorConfiguration * _Nonnull)configuration error:(NSError * _Nullable * _Nullable)error;
542
775
  /// Generates a document file based on a document model and a generator configuration.
543
- /// \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.
544
777
  ///
545
778
  /// \param configuration The configuration for the document generation.
546
779
  ///
@@ -554,7 +787,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
554
787
  @interface GSKDocumentGeneratorConfiguration : NSObject
555
788
  + (GSKDocumentGeneratorConfiguration * _Nonnull)pdfConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
556
789
  + (GSKDocumentGeneratorConfiguration * _Nonnull)tiffConfigurationWithOutputFilePath:(NSString * _Nonnull)outputFilePath SWIFT_WARN_UNUSED_RESULT;
557
- /// 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.
558
791
  @property (nonatomic, readonly) enum GSKDocumentGeneratorFileFormat outputFileFormat;
559
792
  /// The path where the generated document will be written. The extension will not be validated.
560
793
  @property (nonatomic, readonly, copy) NSString * _Nonnull outputFilePath;
@@ -585,7 +818,7 @@ SWIFT_CLASS("_TtC5GSSDK33GSKDocumentGeneratorConfiguration")
585
818
 
586
819
  SWIFT_CLASS("_TtC5GSSDK38GSKDocumentGeneratorDebugConfiguration")
587
820
  @interface GSKDocumentGeneratorDebugConfiguration : NSObject
588
- /// If true, OCR’ed text will visible on the PDF.
821
+ /// If true, OCR’ed text will be visible on the PDF.
589
822
  /// Defaults to false. Use this for debug only
590
823
  @property (nonatomic, readonly) BOOL isOCRTextShownOnPDF;
591
824
  - (nonnull instancetype)initWithIsOCRTextShownOnPDF:(BOOL)isOCRTextShownOnPDF OBJC_DESIGNATED_INITIALIZER;
@@ -629,6 +862,52 @@ SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
629
862
  - (NSString * _Nullable)process:(NSString * _Nonnull)inputFilePath SWIFT_WARN_UNUSED_RESULT;
630
863
  @end
631
864
 
865
+ @class UIImage;
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).
877
+ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
878
+ @interface GSKEditFrameViewController : UIViewController
879
+ /// The image on which the quadrangle is overlaid.
880
+ @property (nonatomic, strong) UIImage * _Nonnull image;
881
+ @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
882
+ /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
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;
888
+ /// Customize the color of the shade within the quadrangle.
889
+ @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
890
+ /// Customize the color of the shade outside the quadrangle.
891
+ @property (nonatomic, strong) UIColor * _Nonnull outsideShadeColor;
892
+ /// Customize the color of the line used to draw the quadrangle.
893
+ @property (nonatomic, strong) UIColor * _Nonnull lineColor;
894
+ /// Customize the width of the corner handles.
895
+ @property (nonatomic) CGFloat handleWidth;
896
+ /// Customize the transparency of the entire overlay
897
+ @property (nonatomic) CGFloat overlayAlpha;
898
+ /// Customize the magnifier center style shown while dragging corners.
899
+ @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
900
+ /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
901
+ ///
902
+ /// \param quadrangle The initial quadrangle to display.
903
+ ///
904
+ - (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image quadrangle:(GSKQuadrangle * _Nonnull)quadrangle OBJC_DESIGNATED_INITIALIZER;
905
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
906
+ - (void)setQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle animated:(BOOL)animated;
907
+ - (void)viewDidLoad;
908
+ - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
909
+ @end
910
+
632
911
  /// A configuration to specify the background cleaning to apply with GSKScanProcessor.
633
912
  SWIFT_CLASS("_TtC5GSSDK40GSKFilterBackgroundCleaningConfiguration")
634
913
  @interface GSKFilterBackgroundCleaningConfiguration : NSObject
@@ -794,6 +1073,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLig
794
1073
  - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
795
1074
  @end
796
1075
 
1076
+ typedef SWIFT_ENUM(NSInteger, GSKFlashStatus, open) {
1077
+ GSKFlashStatusAuto = 0,
1078
+ GSKFlashStatusOn = 1,
1079
+ GSKFlashStatusOff = 2,
1080
+ };
1081
+
797
1082
  enum GSKIntegrationFramework : NSInteger;
798
1083
  SWIFT_CLASS_NAMED("GSKIntegrationContext")
799
1084
  @interface GSKIntegrationContext : NSObject
@@ -833,14 +1118,14 @@ SWIFT_CLASS("_TtC5GSSDK6GSKOCR")
833
1118
  /// The OCR decides what post-processing to apply for the best results.
834
1119
  ///
835
1120
  /// \param configuration Configuration for the OCR process, in particular the language in which the OCR is
836
- /// performed. Note that you must provided the appropriate trained data.
1121
+ /// performed. Note that you must provide the appropriate trained data.
837
1122
  ///
838
1123
  /// \param progressBlock The progress between 0 and 1. Called on the same thread.
839
1124
  ///
840
1125
  ///
841
1126
  /// returns:
842
1127
  /// An OCR result.
843
- - (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;
844
1129
  @end
845
1130
 
846
1131
  /// The configuration for an OCR operation.
@@ -928,186 +1213,6 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
928
1213
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
929
1214
  @end
930
1215
 
931
- @class GSKReadableCodeFlowConfiguration;
932
- @class GSKReadableCodeFlowResult;
933
- /// A flow for scanning readable codes (barcodes, QR codes, etc.)
934
- SWIFT_CLASS("_TtC5GSSDK19GSKReadableCodeFlow")
935
- @interface GSKReadableCodeFlow : NSObject
936
- /// Initializes a new readable code flow
937
- /// \param configuration Configuration for the readable code scanning
938
- ///
939
- - (nonnull instancetype)initWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
940
- /// Starts the readable code scanning flow by presenting a full-screen camera interface.
941
- /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
942
- /// The scanning process respects the code types specified in the flow’s configuration.
943
- /// The method uses Swift’s async/await pattern, suspending until either:
944
- /// <ul>
945
- /// <li>
946
- /// A readable code is successfully detected (except in batch mode)
947
- /// </li>
948
- /// <li>
949
- /// The user taps the done button (batch mode)
950
- /// </li>
951
- /// <li>
952
- /// The user cancels the operation
953
- /// </li>
954
- /// <li>
955
- /// An error occurs during setup or scanning
956
- /// </li>
957
- /// </ul>
958
- /// The behavior varies based on the configuration’s isBatchModeEnabled:
959
- /// <ul>
960
- /// <li>
961
- /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
962
- /// </li>
963
- /// <li>
964
- /// <code>true</code>: Collects unique codes over time until the user taps the done button
965
- /// </li>
966
- /// </ul>
967
- /// Example usage:
968
- /// \code
969
- /// let flow = GSKReadableCodeFlow()
970
- /// do {
971
- /// let result = try await flow.resultByStarting(fromViewController: self)
972
- /// print("Scanned codes: \(result.readableCodes.map { $0.value })")
973
- /// } catch GSKReadableCodeFlowError.userCancellation {
974
- /// print("User canceled scanning")
975
- /// } catch {
976
- /// print("Scanning failed: \(error)")
977
- /// }
978
- ///
979
- /// \endcodeimportant:
980
- /// This method requires camera permissions. Ensure your app’s Info.plist includes
981
- /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
982
- /// note:
983
- /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
984
- /// for an immersive scanning experience.
985
- /// \param viewController The view controller from which to present the camera interface.
986
- /// This should typically be the currently visible view controller.
987
- ///
988
- ///
989
- /// throws:
990
- ///
991
- /// <ul>
992
- /// <li>
993
- /// Typically throws a <code>GSKReadableCodeFlowError</code>
994
- /// </li>
995
- /// </ul>
996
- ///
997
- /// returns:
998
- /// A <code>GSKReadableCodeFlowResult</code> containing the detected readable codes with their
999
- /// decoded values and format types.
1000
- - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nullable, NSError * _Nullable))completionHandler;
1001
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1002
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1003
- @end
1004
-
1005
- @class NSError;
1006
- @interface GSKReadableCodeFlow (SWIFT_EXTENSION(GSSDK))
1007
- /// Instantiates a <code>GSKReadableCodeFlow</code> instance with the provided configuration.
1008
- /// This initializer is only available from Objective-C.
1009
- + (nonnull instancetype)readableCodeFlowWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
1010
- /// Starts the readable code scanning flow.
1011
- /// @param viewController The view controller to present the readable code scanning interface from.
1012
- /// @param successBlock A completion block/closure that will be called on the main
1013
- /// thread upon successful completion of the scan flow. It receives a <code>GSKReadableCodeFlowResult</code> object as
1014
- /// a parameter. This object gives you access to the scanned codes.
1015
- /// @param failureBlock A block/closure called if an error was encountered.
1016
- /// This method is only available from Objective-C.
1017
- - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
1018
- @end
1019
-
1020
- @class UIColor;
1021
- /// Configuration for the UI readable code scanning flow
1022
- /// This class allows customization of which barcode and QR code formats should be detected
1023
- /// during the scanning process. By default, all supported formats are enabled.
1024
- SWIFT_CLASS("_TtC5GSSDK32GSKReadableCodeFlowConfiguration")
1025
- @interface GSKReadableCodeFlowConfiguration : NSObject
1026
- /// Whether batch mode is enabled for code detection.
1027
- /// This setting controls how codes are detected and when they are returned:
1028
- /// <ul>
1029
- /// <li>
1030
- /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
1031
- /// </li>
1032
- /// <li>
1033
- /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
1034
- /// </li>
1035
- /// </ul>
1036
- /// Example:
1037
- /// \code
1038
- /// // Standard mode - return codes immediately (default)
1039
- /// let standardConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: false)
1040
- ///
1041
- /// // Batch mode - collect codes over time
1042
- /// let batchConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: true)
1043
- ///
1044
- /// \endcode
1045
- @property (nonatomic) BOOL isBatchModeEnabled;
1046
- /// The highlight color used for the UI (overlay). Defaults
1047
- /// to <code>.green</code>. For good constrast, we recommend using a bright color.
1048
- @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
1049
- /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
1050
- /// default color will be used (blue on iOS, for example).
1051
- @property (nonatomic, strong) UIColor * _Nullable menuColor;
1052
- /// Creates a new readable code flow configuration with default values
1053
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1054
- @end
1055
-
1056
- @interface GSKReadableCodeFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1057
- /// Create a configuration from a dictionary.
1058
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1059
- /// be used in native projects.
1060
- + (GSKReadableCodeFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1061
- /// Create a configuration from JSON data.
1062
- /// This is used for interfacing with cross-platform plugins but shouldn’t
1063
- /// be used in native projects.
1064
- + (GSKReadableCodeFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1065
- @end
1066
-
1067
- /// Enum that defines various errors that can occur during a readable code flow.
1068
- typedef SWIFT_ENUM(NSInteger, GSKReadableCodeFlowError, open) {
1069
- /// User has canceled the readable code flow
1070
- GSKReadableCodeFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 0,
1071
- /// A general error due to a bad configuration parameter
1072
- GSKReadableCodeFlowConfigurationError SWIFT_COMPILE_NAME("configuration") = 1,
1073
- /// Camera permission was denied
1074
- GSKReadableCodeFlowPermissionDeniedError SWIFT_COMPILE_NAME("permissionDenied") = 2,
1075
- /// Failed to initialize the barcode detector
1076
- GSKReadableCodeFlowDetectorError SWIFT_COMPILE_NAME("detectorError") = 3,
1077
- };
1078
- static NSString * _Nonnull const GSKReadableCodeFlowErrorDomain = @"GSSDK.GSKReadableCodeFlowError";
1079
-
1080
- /// The result of a readable code scanning flow
1081
- /// This class encapsulates the successful outcome of a readable code scanning session,
1082
- /// containing the detected barcode or QR code data.
1083
- SWIFT_CLASS("_TtC5GSSDK25GSKReadableCodeFlowResult")
1084
- @interface GSKReadableCodeFlowResult : NSObject
1085
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1086
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1087
- @end
1088
-
1089
- @interface GSKReadableCodeFlowResult (SWIFT_EXTENSION(GSSDK))
1090
- /// Returns a dictionary representation of the result
1091
- /// The dictionary contains:
1092
- /// <ul>
1093
- /// <li>
1094
- /// readableCodes: An array of code dictionaries, each containing:
1095
- /// <ul>
1096
- /// <li>
1097
- /// value: The decoded string value
1098
- /// </li>
1099
- /// <li>
1100
- /// type: The code type as a string (e.g., “qr”, “code128”)
1101
- /// </li>
1102
- /// </ul>
1103
- /// </li>
1104
- /// </ul>
1105
- @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
1106
- /// Returns a JSON representation of the result.
1107
- /// See <code>dictionary</code> for an explanation of the JSON data’s structure.
1108
- - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
1109
- @end
1110
-
1111
1216
  typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
1112
1217
  GSKReceiptCategoryGas = 0,
1113
1218
  GSKReceiptCategoryTransportation = 1,
@@ -1126,9 +1231,15 @@ SWIFT_CLASS("_TtC5GSSDK13GSKReceiptVAT")
1126
1231
  @end
1127
1232
 
1128
1233
  @class GSKScanFlowConfiguration;
1129
- /// A high-level scanner module.
1130
- /// You present it and when the user is done, you obtain a result object containing the scanned documents.
1131
- /// 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>.
1132
1243
  SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
1133
1244
  @interface GSKScanFlow : NSObject
1134
1245
  - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
@@ -1247,17 +1358,29 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1247
1358
  + (nullable instancetype)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1248
1359
  @end
1249
1360
 
1250
- /// Enum that defines various errors that can occur during a scan flow.
1251
- 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) {
1252
1363
  /// User has canceled the scan flow
1253
- GSKScanFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 999,
1254
- /// 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
1255
1366
  /// inputs match the API requirements.
1256
- 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,
1257
1380
  };
1258
1381
 
1259
1382
  /// The different possible filters for the scanner UI.
1260
- /// All cases match <code>GSKFilterType</code> values except <code>.automatic</code>.
1383
+ /// Each case maps to a predefined filter configuration except <code>.automatic</code>.
1261
1384
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
1262
1385
  GSKScanFlowFilterNone SWIFT_COMPILE_NAME("none") = 0,
1263
1386
  /// Automatic filter
@@ -1298,8 +1421,8 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowFlashMode, open) {
1298
1421
  /// The format of the exported document.
1299
1422
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowMultiPageFormat, open) {
1300
1423
  GSKScanFlowNone SWIFT_COMPILE_NAME("none") = 0,
1301
- GSKScanFlowPDF SWIFT_COMPILE_NAME("PDF") = 1,
1302
- GSKScanFlowTIFF SWIFT_COMPILE_NAME("TIFF") = 2,
1424
+ GSKScanFlowPDF SWIFT_COMPILE_NAME("pdf") = 1,
1425
+ GSKScanFlowTIFF SWIFT_COMPILE_NAME("tiff") = 2,
1303
1426
  };
1304
1427
 
1305
1428
  /// The configuration for text recognition
@@ -1338,9 +1461,9 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
1338
1461
  SWIFT_CLASS("_TtC5GSSDK17GSKScanFlowResult")
1339
1462
  @interface GSKScanFlowResult : NSObject
1340
1463
  /// Document containing the pages that were scanned during the scan
1341
- /// flow. The format is specified by <code>multiPageFormat</code> property of
1342
- /// the used <code>GSKScanFlowConfiguration</code>. Is <code>nil</code> if no format was
1343
- /// 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.
1344
1467
  @property (nonatomic, copy) NSURL * _Nullable multiPageDocumentURL;
1345
1468
  /// The individual scans taken during the scan flow.
1346
1469
  /// Each scan object contains both the original and the enhanced scans.
@@ -1373,7 +1496,7 @@ SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
1373
1496
  /// If OCR was performed, the recognized text.
1374
1497
  @property (nonatomic, strong) GSKScanFlowOCRResult * _Nullable ocrResult;
1375
1498
  /// If structured data extraction was performed, the structured data.
1376
- @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredDataResult;
1499
+ @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredData;
1377
1500
  - (nonnull instancetype)initWithOriginalFilePath:(NSString * _Nonnull)originalFilePath enhancedFilePath:(NSString * _Nonnull)enhancedFilePath OBJC_DESIGNATED_INITIALIZER;
1378
1501
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1379
1502
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@@ -1403,6 +1526,8 @@ SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
1403
1526
  /// Present if receipt extraction was requested and a receipt/invoice was
1404
1527
  /// successfully extracted, <code>nil</code> otherwise.
1405
1528
  @property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
1529
+ /// Present if barcode extraction was requested and codes were successfully extracted, empty otherwise.
1530
+ @property (nonatomic, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
1406
1531
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1407
1532
  @end
1408
1533
 
@@ -1542,23 +1667,19 @@ SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
1542
1667
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1543
1668
  @end
1544
1669
 
1545
- @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.
1546
1676
  SWIFT_CLASS("_TtC5GSSDK28GSKTextLayoutToTextConverter")
1547
1677
  @interface GSKTextLayoutToTextConverter : NSObject
1548
- - (GSKTextLayoutToTextConverterResult * _Nullable)convert:(GSKTextLayout * _Nonnull)textLayout error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1549
1678
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1550
1679
  @end
1551
1680
 
1552
1681
  SWIFT_CLASS("_TtC5GSSDK34GSKTextLayoutToTextConverterResult")
1553
1682
  @interface GSKTextLayoutToTextConverterResult : NSObject
1554
- /// The text reconstructed from the text layout.
1555
- @property (nonatomic, readonly, copy) NSString * _Nonnull text;
1556
- /// The average word confidence of the recognized text.
1557
- /// A value between 0 and 100
1558
- @property (nonatomic, readonly) NSInteger averageWordConfidence;
1559
- /// The number of words in the recognized text.
1560
- /// This is the number of words on which the average word confidence has been computed.
1561
- @property (nonatomic, readonly) NSInteger wordCount;
1562
1683
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1563
1684
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1564
1685
  @end
@@ -1571,12 +1692,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
1571
1692
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1572
1693
  @end
1573
1694
 
1574
- @interface GSKView (SWIFT_EXTENSION(GSSDK))
1575
- - (void)startSearchAnimation;
1576
- - (void)startSnapAnimationWithDuration:(NSTimeInterval)duration;
1577
- - (void)endSnapAnimation;
1578
- @end
1579
-
1580
1695
  SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")
1581
1696
  @interface GSSDKResources : NSObject
1582
1697
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _Nonnull bundle;)