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

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 (110) 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/GSKEditableFrame.h +0 -1
  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/GSKReadabilityResult.h +1 -1
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKRotation.h +5 -1
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +2 -2
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +0 -1
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +394 -310
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +0 -3
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/UIImage+GSKUtils.h +8 -3
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +19744 -17787
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +302 -249
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +302 -249
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
  38. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
  44. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
  45. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
  46. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
  47. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
  48. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
  49. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Assets.car +0 -0
  50. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/DeviceList.plist +0 -0
  51. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  52. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/PrivacyInfo.xcprivacy +34 -0
  53. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  54. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDefaultLogLevel.h +1 -1
  55. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditableFrame.h +0 -1
  56. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +0 -8
  57. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKError.h +7 -3
  58. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLog.h +1 -1
  59. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLogger.h +1 -1
  60. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKProcessingResult.h +0 -4
  61. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKReadabilityResult.h +1 -1
  62. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKRotation.h +5 -1
  63. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +2 -2
  64. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +0 -1
  65. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +801 -633
  66. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +0 -3
  67. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/UIImage+GSKUtils.h +8 -3
  68. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  69. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +19744 -17787
  70. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +302 -249
  71. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  72. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +302 -249
  73. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +19744 -17787
  74. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +302 -249
  75. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  76. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +302 -249
  77. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
  78. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
  79. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
  80. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
  81. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
  82. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
  83. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
  84. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
  85. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
  86. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
  87. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
  88. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
  89. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
  90. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
  91. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
  92. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
  93. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
  94. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
  95. package/ios/RNGeniusScan.m +8 -8
  96. package/package.json +1 -1
  97. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditFrameView.h +0 -71
  98. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditFrameViewController.h +0 -62
  99. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterType.h +0 -43
  100. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKView.h +0 -70
  101. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/png.h +0 -3358
  102. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pngconf.h +0 -615
  103. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivateHeaders/pnglibconf.h +0 -233
  104. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditFrameView.h +0 -71
  105. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditFrameViewController.h +0 -62
  106. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterType.h +0 -43
  107. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKView.h +0 -70
  108. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/png.h +0 -3358
  109. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivateHeaders/pngconf.h +0 -615
  110. 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,218 @@ 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.
374
- /// 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;
344
+ /// A barcode such as 1D barcodes or QR codes.
345
+ SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
346
+ @interface GSKBarcode : NSObject
388
347
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
389
348
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
390
349
  @end
391
350
 
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;
351
+ @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
352
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
397
353
  @end
398
354
 
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;
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 flow for scanning barcodes and QR codes.
363
+ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
364
+ @interface GSKBarcodeScanFlow : NSObject
365
+ /// Initializes a new barcode scan flow
366
+ /// \param configuration Configuration for the barcode scanning
367
+ ///
368
+ - (nonnull instancetype)initWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
369
+ /// Starts the barcode scanning flow by presenting a full-screen camera interface.
370
+ /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
371
+ /// The scanning process respects the code types specified in the flow’s configuration.
372
+ /// The method uses Swift’s async/await pattern, suspending until either:
373
+ /// <ul>
374
+ /// <li>
375
+ /// A barcode is successfully detected (except in batch mode)
376
+ /// </li>
377
+ /// <li>
378
+ /// The user taps the done button (batch mode)
379
+ /// </li>
380
+ /// <li>
381
+ /// The user cancels the operation
382
+ /// </li>
383
+ /// <li>
384
+ /// An error occurs during setup or scanning
385
+ /// </li>
386
+ /// </ul>
387
+ /// The behavior varies based on the configuration’s isBatchModeEnabled:
388
+ /// <ul>
389
+ /// <li>
390
+ /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
391
+ /// </li>
392
+ /// <li>
393
+ /// <code>true</code>: Collects unique codes over time until the user taps the done button
394
+ /// </li>
395
+ /// </ul>
396
+ /// Example usage:
397
+ /// \code
398
+ /// let flow = GSKBarcodeScanFlow()
399
+ /// do {
400
+ /// let result = try await flow.resultByStarting(fromViewController: self)
401
+ /// print("Scanned codes: \(result.barcodes.map { $0.value })")
402
+ /// } catch GSKBarcodeScanFlowError.userCancellation {
403
+ /// print("User canceled scanning")
404
+ /// } catch {
405
+ /// print("Scanning failed: \(error)")
406
+ /// }
407
+ ///
408
+ /// \endcodeimportant:
409
+ /// This method requires camera permissions. Ensure your app’s Info.plist includes
410
+ /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
411
+ /// note:
412
+ /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
413
+ /// for an immersive scanning experience.
414
+ /// \param viewController The view controller from which to present the camera interface.
415
+ /// This should typically be the currently visible view controller.
416
+ ///
417
+ ///
418
+ /// throws:
419
+ ///
420
+ /// <ul>
421
+ /// <li>
422
+ /// Typically throws a <code>GSKBarcodeScanFlowError</code>
423
+ /// </li>
424
+ /// </ul>
425
+ ///
426
+ /// returns:
427
+ /// A <code>GSKBarcodeScanFlowResult</code> containing the detected barcodes with their
428
+ /// decoded values and format types.
429
+ - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
430
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
431
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
409
432
  @end
410
433
 
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;
434
+ @class NSError;
435
+ @interface GSKBarcodeScanFlow (SWIFT_EXTENSION(GSSDK))
436
+ /// Instantiates a <code>GSKBarcodeScanFlow</code> instance with the provided configuration.
437
+ /// This initializer is only available from Objective-C.
438
+ + (nonnull instancetype)barcodeScanFlowWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
439
+ /// Starts the barcode scanning flow.
440
+ /// @param viewController The view controller to present the barcode scanning interface from.
441
+ /// @param successBlock A completion block/closure that will be called on the main
442
+ /// thread upon successful completion of the scan flow. It receives a <code>GSKBarcodeScanFlowResult</code> object as
443
+ /// a parameter. This object gives you access to the scanned codes.
444
+ /// @param failureBlock A block/closure called if an error was encountered.
445
+ /// This method is only available from Objective-C.
446
+ - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
419
447
  @end
420
448
 
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.
449
+ @class UIColor;
450
+ /// Configuration for the UI barcode scanning flow
451
+ /// This class allows customization of which barcode and QR code formats should be detected
452
+ /// during the scanning process. By default, all supported formats are enabled.
453
+ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
454
+ @interface GSKBarcodeScanFlowConfiguration : NSObject
455
+ /// Whether batch mode is enabled for code detection.
456
+ /// This setting controls how codes are detected and when they are returned:
457
+ /// <ul>
458
+ /// <li>
459
+ /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
460
+ /// </li>
461
+ /// <li>
462
+ /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
463
+ /// </li>
464
+ /// </ul>
465
+ /// Example:
466
+ /// \code
467
+ /// // Standard mode - return codes immediately (default)
468
+ /// let standardConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: false)
427
469
  ///
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;
470
+ /// // Batch mode - collect codes over time
471
+ /// let batchConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: true)
472
+ ///
473
+ /// \endcode
474
+ @property (nonatomic) BOOL isBatchModeEnabled;
475
+ /// The highlight color used for the UI (overlay). Defaults
476
+ /// to <code>.green</code>. For good constrast, we recommend using a bright color.
477
+ @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
478
+ /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
479
+ /// default color will be used (blue on iOS, for example).
480
+ @property (nonatomic, strong) UIColor * _Nullable menuColor;
481
+ /// Creates a new barcode scan flow configuration with default values
482
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
431
483
  @end
432
484
 
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,
485
+ @class NSDictionary;
486
+ @interface GSKBarcodeScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
487
+ /// Create a configuration from a dictionary.
488
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
489
+ /// be used in native projects.
490
+ + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
491
+ /// Create a configuration from JSON data.
492
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
493
+ /// be used in native projects.
494
+ + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
495
+ @end
496
+
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,
443
507
  };
508
+ static NSString * _Nonnull const GSKBarcodeScanFlowErrorDomain = @"GSSDK.GSKBarcodeScanFlowError";
509
+
510
+ /// The result of a barcode scanning flow.
511
+ /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
512
+ /// containing the detected barcode or QR code data.
513
+ SWIFT_CLASS("_TtC5GSSDK24GSKBarcodeScanFlowResult")
514
+ @interface GSKBarcodeScanFlowResult : NSObject
515
+ /// The detected barcodes containing their decoded values and types.
516
+ /// This property provides access to an array of detected codes, each containing
517
+ /// both the string content and format type (e.g., QR code, Code 128, EAN-13, etc.).
518
+ /// <ul>
519
+ /// <li>
520
+ /// For standard mode: Contains all codes detected in a single frame
521
+ /// </li>
522
+ /// <li>
523
+ /// For batch mode: Contains all codes collected over the scanning session
524
+ /// </li>
525
+ /// </ul>
526
+ @property (nonatomic, readonly, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
527
+ /// Creates a new barcode scan flow result.
528
+ /// \param barcodes The detected barcodes.
529
+ ///
530
+ - (nonnull instancetype)initWithBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes OBJC_DESIGNATED_INITIALIZER;
531
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
532
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
533
+ @end
534
+
535
+ @interface GSKBarcodeScanFlowResult (SWIFT_EXTENSION(GSSDK))
536
+ /// Returns a dictionary representation of the result
537
+ /// The dictionary contains:
538
+ /// <ul>
539
+ /// <li>
540
+ /// barcodes: An array of code dictionaries, each containing:
541
+ /// <ul>
542
+ /// <li>
543
+ /// value: The decoded string value
544
+ /// </li>
545
+ /// <li>
546
+ /// type: The code type as a string (e.g., “qr”, “code128”)
547
+ /// </li>
548
+ /// </ul>
549
+ /// </li>
550
+ /// </ul>
551
+ @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
552
+ /// Returns a JSON representation of the result.
553
+ /// See <code>dictionary</code> for an explanation of the JSON data’s structure.
554
+ - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
555
+ @end
444
556
 
445
557
  /// Represents an error raised by the camera session
446
558
  typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
@@ -455,59 +567,179 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
455
567
  GSKCameraSessionErrorWarnLockDevice = -1003,
456
568
  };
457
569
 
458
- typedef SWIFT_ENUM(NSInteger, GSKCameraSessionFlashStatus, open) {
459
- GSKCameraSessionFlashStatusAuto = 0,
460
- GSKCameraSessionFlashStatusOn = 1,
461
- GSKCameraSessionFlashStatusOff = 2,
462
- };
463
-
464
570
  @class NSCoder;
465
- @protocol UIViewControllerTransitionCoordinator;
466
571
  @class NSBundle;
467
- /// A ready-to-use camera interface for scanning documents.
572
+ /// A camera view controller to scan documents or barcodes.
573
+ /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
574
+ /// 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.
576
+ /// note:
577
+ ///
578
+ /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
579
+ /// and a delegate callback (<code>cameraViewController(_:didGenerateScan:)</code>) is called when the photo is ready.
580
+ /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
581
+ /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
582
+ /// 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>.
468
584
  SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
469
585
  @interface GSKCameraViewController : UIViewController
470
586
  - (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
587
  - (void)viewDidLoad;
475
588
  - (void)viewWillAppear:(BOOL)animated;
476
589
  - (void)viewWillDisappear:(BOOL)animated;
477
- - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator> _Nonnull)coordinator;
590
+ /// Manually trigger a photo.
591
+ /// Use this to handle the user tapping on a “take photo” button, or your own
592
+ /// custom logic to take a photo.
593
+ - (void)takePhoto;
478
594
  - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
479
595
  @end
480
596
 
481
- @class GSKView;
482
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK)) <GSKViewDelegate>
483
- - (void)cameraView:(GSKView * _Nonnull)cameraView requestedFocusAtPoint:(CGPoint)focusPoint;
597
+ @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
484
598
  @end
485
599
 
600
+ /// A document detection mode
601
+ /// When detecting a document, the camera controller can just highlight the document, or also
602
+ /// highlight and trigger the photo when the detection is stable enough.
603
+ typedef SWIFT_ENUM(NSInteger, DocumentDetectionMode, open) {
604
+ /// Visual highlighting only.
605
+ /// The camera will detect document edges and provide visual feedback by drawing
606
+ /// a document overlay, but will not automatically capture photos. Users must
607
+ /// manually trigger photo capture.
608
+ DocumentDetectionModeHighlightOnly = 0,
609
+ /// Highlighting with automatic capture.
610
+ /// Similar to <code>highlightOnly</code>, but the camera will automatically take a photo
611
+ /// when a stable document is detected for a sufficient duration. This provides
612
+ /// a hands-free scanning experience.
613
+ DocumentDetectionModeHighlightAndAutoCapture = 1,
614
+ };
615
+
486
616
  @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
487
- /// Snap the photo
488
- - (void)takePhoto;
489
617
  @end
490
618
 
491
- @class GSKScan;
492
- @class GSKQuadrangle;
619
+ /// Constants indicating an interruption reason for the camera session.
620
+ typedef SWIFT_ENUM(NSInteger, InterruptionReason, open) {
621
+ /// An interruption caused by the app being sent to the background while using a camera.
622
+ InterruptionReasonVideoDeviceNotAvailableInBackground = 0,
623
+ /// An interruption caused by the audio hardware temporarily being made unavailable, for instance,
624
+ /// for a phone call, or alarm.
625
+ InterruptionReasonAudioDeviceInUseByAnotherClient = 1,
626
+ /// An interruption caused by the video device temporarily being made unavailable, for instance,
627
+ /// when stolen away by another app.
628
+ InterruptionReasonVideoDeviceInUseByAnotherClient = 2,
629
+ /// An interruption caused when the app is running in a multi-app layout, causing resource contention
630
+ /// and degraded recording quality of service. Given your present session configuration, the
631
+ /// session may only be run if your app occupies the full screen.
632
+ InterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps = 3,
633
+ /// An interruption caused by the video device temporarily being made unavailable due to system pressure,
634
+ /// such as thermal duress.
635
+ InterruptionReasonVideoDeviceNotAvailableDueToSystemPressure = 4,
636
+ InterruptionReasonUnknown = 5,
637
+ };
638
+
493
639
  @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;
640
+ /// Factory method for a camera view controller with document detection.
641
+ /// This is only to be used from Objective-C. From Swift, prefer using <code>init(configuration:)</code> instead.
642
+ /// \param documentDetectionMode The document detection mode.
643
+ ///
644
+ /// \param documentOverlayColor The color of the document overlay.
645
+ ///
646
+ + (void)makeCameraViewControllerWithDocumentDetectionMode:(enum DocumentDetectionMode)documentDetectionMode documentOverlayColor:(UIColor * _Nonnull)documentOverlayColor completionHandler:(void (^ _Nonnull)(GSKCameraViewController * _Nullable, NSError * _Nullable))completionHandler;
647
+ @end
648
+
649
+ @class GSKQuadrangle;
650
+ @class GSKScan;
651
+ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
652
+ @protocol GSKCameraViewControllerDelegate
653
+ @optional
654
+ /// The camera view controller failed with an error.
655
+ /// \param cameraViewController The camera view controller
656
+ ///
657
+ /// \param error The encountered error.
658
+ ///
659
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFailWithError:(NSError * _Nonnull)error;
660
+ /// The camera view controller encountered a non-fatal error.
661
+ /// \param cameraViewController The camera view controller
662
+ ///
663
+ /// \param error The encountered error.
664
+ ///
665
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didEncounterNonCriticalError:(NSError * _Nonnull)error;
666
+ /// The camera view controller started running
667
+ /// \param cameraViewController The camera view controller
668
+ ///
669
+ - (void)cameraViewControllerDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
670
+ /// The camera view controller stopped running
671
+ /// \param cameraViewController The camera view controller
672
+ ///
673
+ - (void)cameraViewControllerDidStop:(GSKCameraViewController * _Nonnull)cameraViewController;
674
+ /// The camera view controller was interrupted.
675
+ /// This can happen in various cases, including when the user goes to Split View mode on iPad.
676
+ /// \param cameraViewController The camera view controller
677
+ ///
678
+ /// \param reason The reason why the camera view controller was interrupted.
679
+ ///
680
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController wasInterruptedWithReason:(enum InterruptionReason)reason;
681
+ /// The camera view controller resumes after interruption
682
+ /// \param cameraViewController The camera view controller
683
+ ///
684
+ - (void)cameraViewControllerInterruptionDidEnd:(GSKCameraViewController * _Nonnull)cameraViewController;
685
+ /// The camera view controller is still looking for a quadrangle.
686
+ /// This is a general notification about the status of the search: we may or may not have identified
687
+ /// its edges. If you want to act on identified edges, listen to the <code>cameraViewController:didFindDocumentWithQuadrangle:</code>
688
+ /// delegate method.
689
+ /// <ul>
690
+ /// <li>
691
+ /// Parameters:
692
+ /// </li>
693
+ /// <li>
694
+ /// cameraViewController: The camera view controller
695
+ /// </li>
696
+ /// </ul>
697
+ - (void)cameraViewControllerIsSearchingForDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
698
+ /// The camera view controller identified a document in the last frame of the photo stream
699
+ /// \param cameraViewController The camera view controller
700
+ ///
701
+ /// \param quadrangle The quadrangle of the document that has been found.
702
+ ///
703
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
704
+ /// The camera view controller couldn’t identify a document in the last frame of the photo stream.
705
+ /// This doesn’t mean that the camera view controller has stopped searching for documents or failed.
706
+ /// It just means no document has been identified. In this case, you want to clear any overlay.
707
+ /// \param cameraViewController The camera view controller
708
+ ///
709
+ - (void)cameraViewControllerFailedToFindDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
710
+ /// The camera view controller real-time document detection will soon take the photo of a quadrangle, but if the document
711
+ /// detection is not stable enough, the process can still be
712
+ /// cancelled.
713
+ /// It’s a good time to tell the user to remain stable.
714
+ /// Only called when the document detection is set to .highlightAndAutoCapture.
715
+ /// \param cameraViewController The camera view controller
716
+ ///
717
+ - (void)cameraViewControllerPhotoStabilizationDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
718
+ /// The camera view controller is going to automatically take a photo because the detection was stable enough.
719
+ /// The photo taking is underway and cannot be interrupted at this stage.
720
+ /// \param cameraViewController The camera view controller
721
+ ///
722
+ /// \param quadrangle The quadrangle of the document that will be photographed.
723
+ ///
724
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willSnapPhotoWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
725
+ /// The camera view controller just took a photo, but it hasn’t been post-processed it yet
726
+ /// \param cameraViewController The camera view controller
727
+ ///
728
+ - (void)cameraViewControllerDidSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
729
+ /// The camera view controller has finished processing the photo we just took.
730
+ /// \param cameraViewController The camera view controller
731
+ ///
732
+ /// \param scan The scan object that has been generated. The image contained in the scan object is the full,
733
+ /// unprocessed image in which the document was detected. Use <code>GSKScanProcessor</code> to process and
734
+ /// warp and enhance the scanned document.
735
+ ///
736
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didGenerateScan:(GSKScan * _Nonnull)scan;
737
+ /// Camera view controller has detected barcodes.
738
+ /// \param cameraViewController The camera view controller
739
+ ///
740
+ /// \param barcodes The detected barcodes
741
+ ///
742
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes;
511
743
  @end
512
744
 
513
745
  /// The type of document detected by the document finder.
@@ -629,6 +861,36 @@ SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
629
861
  - (NSString * _Nullable)process:(NSString * _Nonnull)inputFilePath SWIFT_WARN_UNUSED_RESULT;
630
862
  @end
631
863
 
864
+ @class UIImage;
865
+ @class UIView;
866
+ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
867
+ @interface GSKEditFrameViewController : UIViewController
868
+ /// The image on which the quadrangle is overlaid.
869
+ @property (nonatomic, strong) UIImage * _Nonnull image;
870
+ @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
871
+ /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
872
+ @property (nonatomic, strong) GSKQuadrangle * _Nonnull quadrangle;
873
+ /// Customize the color of the shade within the quadrangle.
874
+ @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
875
+ /// Customize the color of the shade outside the quadrangle.
876
+ @property (nonatomic, strong) UIColor * _Nonnull outsideShadeColor;
877
+ /// Customize the color of the line used to draw the quadrangle.
878
+ @property (nonatomic, strong) UIColor * _Nonnull lineColor;
879
+ /// Customize the width of the corner handles.
880
+ @property (nonatomic) CGFloat handleWidth;
881
+ /// Customize the magnifier center style shown while dragging corners.
882
+ @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
883
+ /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
884
+ ///
885
+ /// \param quadrangle The initial quadrangle to display.
886
+ ///
887
+ - (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image quadrangle:(GSKQuadrangle * _Nonnull)quadrangle OBJC_DESIGNATED_INITIALIZER;
888
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
889
+ - (void)setQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle animated:(BOOL)animated;
890
+ - (void)viewDidLoad;
891
+ - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
892
+ @end
893
+
632
894
  /// A configuration to specify the background cleaning to apply with GSKScanProcessor.
633
895
  SWIFT_CLASS("_TtC5GSSDK40GSKFilterBackgroundCleaningConfiguration")
634
896
  @interface GSKFilterBackgroundCleaningConfiguration : NSObject
@@ -794,6 +1056,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLig
794
1056
  - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
795
1057
  @end
796
1058
 
1059
+ typedef SWIFT_ENUM(NSInteger, GSKFlashStatus, open) {
1060
+ GSKFlashStatusAuto = 0,
1061
+ GSKFlashStatusOn = 1,
1062
+ GSKFlashStatusOff = 2,
1063
+ };
1064
+
797
1065
  enum GSKIntegrationFramework : NSInteger;
798
1066
  SWIFT_CLASS_NAMED("GSKIntegrationContext")
799
1067
  @interface GSKIntegrationContext : NSObject
@@ -928,186 +1196,6 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
928
1196
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
929
1197
  @end
930
1198
 
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
1199
  typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
1112
1200
  GSKReceiptCategoryGas = 0,
1113
1201
  GSKReceiptCategoryTransportation = 1,
@@ -1257,7 +1345,7 @@ typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
1257
1345
  };
1258
1346
 
1259
1347
  /// The different possible filters for the scanner UI.
1260
- /// All cases match <code>GSKFilterType</code> values except <code>.automatic</code>.
1348
+ /// Each case maps to a predefined filter configuration except <code>.automatic</code>.
1261
1349
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
1262
1350
  GSKScanFlowFilterNone SWIFT_COMPILE_NAME("none") = 0,
1263
1351
  /// Automatic filter
@@ -1373,7 +1461,7 @@ SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
1373
1461
  /// If OCR was performed, the recognized text.
1374
1462
  @property (nonatomic, strong) GSKScanFlowOCRResult * _Nullable ocrResult;
1375
1463
  /// If structured data extraction was performed, the structured data.
1376
- @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredDataResult;
1464
+ @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredData;
1377
1465
  - (nonnull instancetype)initWithOriginalFilePath:(NSString * _Nonnull)originalFilePath enhancedFilePath:(NSString * _Nonnull)enhancedFilePath OBJC_DESIGNATED_INITIALIZER;
1378
1466
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1379
1467
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@@ -1403,6 +1491,8 @@ SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
1403
1491
  /// Present if receipt extraction was requested and a receipt/invoice was
1404
1492
  /// successfully extracted, <code>nil</code> otherwise.
1405
1493
  @property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
1494
+ /// Present if barcode extraction was requested and codes were successfully extracted, empty otherwise.
1495
+ @property (nonatomic, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
1406
1496
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1407
1497
  @end
1408
1498
 
@@ -1571,12 +1661,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
1571
1661
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1572
1662
  @end
1573
1663
 
1574
- @interface GSKView (SWIFT_EXTENSION(GSSDK))
1575
- - (void)startSearchAnimation;
1576
- - (void)startSnapAnimationWithDuration:(NSTimeInterval)duration;
1577
- - (void)endSnapAnimation;
1578
- @end
1579
-
1580
1664
  SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")
1581
1665
  @interface GSSDKResources : NSObject
1582
1666
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _Nonnull bundle;)
@@ -1885,9 +1969,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
1885
1969
  #if __has_warning("-Watimport-in-framework-header")
1886
1970
  #pragma clang diagnostic ignored "-Watimport-in-framework-header"
1887
1971
  #endif
1888
- @import AVFoundation;
1889
1972
  @import CoreFoundation;
1890
- @import CoreGraphics;
1891
1973
  @import Dispatch;
1892
1974
  @import Foundation;
1893
1975
  @import ObjectiveC;
@@ -1916,14 +1998,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
1916
1998
 
1917
1999
  #if defined(__OBJC__)
1918
2000
 
1919
- SWIFT_PROTOCOL("_TtP5GSSDK20CGImageRepresentable_")
1920
- @protocol CGImageRepresentable
1921
- - (CGImageRef _Nullable)CGImageRepresentation SWIFT_WARN_UNUSED_RESULT;
1922
- @end
1923
-
1924
- @interface AVCapturePhoto (SWIFT_EXTENSION(GSSDK)) <CGImageRepresentable>
1925
- @end
1926
-
1927
2001
  @class NSString;
1928
2002
  /// Entry point of the SDK. Use this to initialize the SDK with your license key.
1929
2003
  SWIFT_CLASS("_TtC5GSSDK3GSK")
@@ -1946,105 +2020,227 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _No
1946
2020
  /// updated to the latest version of your app containing the new keys. If <code>autoRefresh</code> is enabled, the following information is sent to the Genius Scan
1947
2021
  /// SDK servers: the current license key, a device-unique UUID, and the current version of the app.
1948
2022
  ///
1949
- + (void)setLicenseKey:(NSString * _Nonnull)licenseKey autoRefresh:(BOOL)autoRefresh;
1950
- /// Checks that the Genius Scan SDK was correctly initialized with a valid license key.
2023
+ + (void)setLicenseKey:(NSString * _Nonnull)licenseKey autoRefresh:(BOOL)autoRefresh;
2024
+ /// Checks that the Genius Scan SDK was correctly initialized with a valid license key.
2025
+ ///
2026
+ /// throws:
2027
+ /// An error if the license key is invalid or expired.
2028
+ + (BOOL)checkInitializationAndReturnError:(NSError * _Nullable * _Nullable)error;
2029
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
2030
+ @end
2031
+
2032
+ /// A barcode such as 1D barcodes or QR codes.
2033
+ SWIFT_CLASS("_TtC5GSSDK10GSKBarcode")
2034
+ @interface GSKBarcode : NSObject
2035
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2036
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2037
+ @end
2038
+
2039
+ @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
2040
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
2041
+ @end
2042
+
2043
+ @interface GSKBarcode (SWIFT_EXTENSION(GSSDK))
2044
+ @property (nonatomic, readonly) NSUInteger hash;
2045
+ @end
2046
+
2047
+ @class GSKBarcodeScanFlowConfiguration;
2048
+ @class UIViewController;
2049
+ @class GSKBarcodeScanFlowResult;
2050
+ /// A flow for scanning barcodes and QR codes.
2051
+ SWIFT_CLASS("_TtC5GSSDK18GSKBarcodeScanFlow")
2052
+ @interface GSKBarcodeScanFlow : NSObject
2053
+ /// Initializes a new barcode scan flow
2054
+ /// \param configuration Configuration for the barcode scanning
2055
+ ///
2056
+ - (nonnull instancetype)initWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
2057
+ /// Starts the barcode scanning flow by presenting a full-screen camera interface.
2058
+ /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
2059
+ /// The scanning process respects the code types specified in the flow’s configuration.
2060
+ /// The method uses Swift’s async/await pattern, suspending until either:
2061
+ /// <ul>
2062
+ /// <li>
2063
+ /// A barcode is successfully detected (except in batch mode)
2064
+ /// </li>
2065
+ /// <li>
2066
+ /// The user taps the done button (batch mode)
2067
+ /// </li>
2068
+ /// <li>
2069
+ /// The user cancels the operation
2070
+ /// </li>
2071
+ /// <li>
2072
+ /// An error occurs during setup or scanning
2073
+ /// </li>
2074
+ /// </ul>
2075
+ /// The behavior varies based on the configuration’s isBatchModeEnabled:
2076
+ /// <ul>
2077
+ /// <li>
2078
+ /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
2079
+ /// </li>
2080
+ /// <li>
2081
+ /// <code>true</code>: Collects unique codes over time until the user taps the done button
2082
+ /// </li>
2083
+ /// </ul>
2084
+ /// Example usage:
2085
+ /// \code
2086
+ /// let flow = GSKBarcodeScanFlow()
2087
+ /// do {
2088
+ /// let result = try await flow.resultByStarting(fromViewController: self)
2089
+ /// print("Scanned codes: \(result.barcodes.map { $0.value })")
2090
+ /// } catch GSKBarcodeScanFlowError.userCancellation {
2091
+ /// print("User canceled scanning")
2092
+ /// } catch {
2093
+ /// print("Scanning failed: \(error)")
2094
+ /// }
2095
+ ///
2096
+ /// \endcodeimportant:
2097
+ /// This method requires camera permissions. Ensure your app’s Info.plist includes
2098
+ /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
2099
+ /// note:
2100
+ /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
2101
+ /// for an immersive scanning experience.
2102
+ /// \param viewController The view controller from which to present the camera interface.
2103
+ /// This should typically be the currently visible view controller.
2104
+ ///
2105
+ ///
2106
+ /// throws:
2107
+ ///
2108
+ /// <ul>
2109
+ /// <li>
2110
+ /// Typically throws a <code>GSKBarcodeScanFlowError</code>
2111
+ /// </li>
2112
+ /// </ul>
2113
+ ///
2114
+ /// returns:
2115
+ /// A <code>GSKBarcodeScanFlowResult</code> containing the detected barcodes with their
2116
+ /// decoded values and format types.
2117
+ - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
2118
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2119
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2120
+ @end
2121
+
2122
+ @class NSError;
2123
+ @interface GSKBarcodeScanFlow (SWIFT_EXTENSION(GSSDK))
2124
+ /// Instantiates a <code>GSKBarcodeScanFlow</code> instance with the provided configuration.
2125
+ /// This initializer is only available from Objective-C.
2126
+ + (nonnull instancetype)barcodeScanFlowWithConfiguration:(GSKBarcodeScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
2127
+ /// Starts the barcode scanning flow.
2128
+ /// @param viewController The view controller to present the barcode scanning interface from.
2129
+ /// @param successBlock A completion block/closure that will be called on the main
2130
+ /// thread upon successful completion of the scan flow. It receives a <code>GSKBarcodeScanFlowResult</code> object as
2131
+ /// a parameter. This object gives you access to the scanned codes.
2132
+ /// @param failureBlock A block/closure called if an error was encountered.
2133
+ /// This method is only available from Objective-C.
2134
+ - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKBarcodeScanFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
2135
+ @end
2136
+
2137
+ @class UIColor;
2138
+ /// Configuration for the UI barcode scanning flow
2139
+ /// This class allows customization of which barcode and QR code formats should be detected
2140
+ /// during the scanning process. By default, all supported formats are enabled.
2141
+ SWIFT_CLASS("_TtC5GSSDK31GSKBarcodeScanFlowConfiguration")
2142
+ @interface GSKBarcodeScanFlowConfiguration : NSObject
2143
+ /// Whether batch mode is enabled for code detection.
2144
+ /// This setting controls how codes are detected and when they are returned:
2145
+ /// <ul>
2146
+ /// <li>
2147
+ /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
2148
+ /// </li>
2149
+ /// <li>
2150
+ /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
2151
+ /// </li>
2152
+ /// </ul>
2153
+ /// Example:
2154
+ /// \code
2155
+ /// // Standard mode - return codes immediately (default)
2156
+ /// let standardConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: false)
2157
+ ///
2158
+ /// // Batch mode - collect codes over time
2159
+ /// let batchConfig = GSKBarcodeScanFlowConfiguration(isBatchModeEnabled: true)
1951
2160
  ///
1952
- /// throws:
1953
- /// An error if the license key is invalid or expired.
1954
- + (BOOL)checkInitializationAndReturnError:(NSError * _Nullable * _Nullable)error;
2161
+ /// \endcode
2162
+ @property (nonatomic) BOOL isBatchModeEnabled;
2163
+ /// The highlight color used for the UI (overlay). Defaults
2164
+ /// to <code>.green</code>. For good constrast, we recommend using a bright color.
2165
+ @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
2166
+ /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
2167
+ /// default color will be used (blue on iOS, for example).
2168
+ @property (nonatomic, strong) UIColor * _Nullable menuColor;
2169
+ /// Creates a new barcode scan flow configuration with default values
1955
2170
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1956
2171
  @end
1957
2172
 
1958
- @class AVCaptureDevice;
1959
- @class AVCaptureSession;
1960
- enum GSKCameraSessionFlashStatus : NSInteger;
1961
- enum GSKCameraSessionDocumentDetection : NSInteger;
1962
- @class GSKCameraSessionConfiguration;
1963
- SWIFT_CLASS("_TtC5GSSDK16GSKCameraSession")
1964
- @interface GSKCameraSession : NSObject
1965
- /// Minimum duration in <code>.aboutToTrigger</code> state before triggering the photo.
1966
- /// This can be used to coordinate animations.
1967
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDurationInAboutToTriggerForTrigger;)
1968
- + (NSTimeInterval)minDurationInAboutToTriggerForTrigger SWIFT_WARN_UNUSED_RESULT;
1969
- /// Public for legacy reasons, not to be used directly.
1970
- @property (nonatomic, strong) AVCaptureDevice * _Nullable captureDevice;
1971
- /// Public for legacy reasons, not to be used directly.
1972
- @property (nonatomic, strong) AVCaptureSession * _Nullable captureSession;
1973
- /// The flash mode. Default is .auto.
1974
- @property (nonatomic) enum GSKCameraSessionFlashStatus flashStatus;
1975
- /// Returns the current status of the document detection.
1976
- /// This is a computed property that maps to the new activeDetectionMode property for backward compatibility.
1977
- /// Observable.
1978
- /// important:
1979
- /// This property is deprecated. Use <code>activeDetectionMode</code> instead, which supports both document and readable
1980
- /// code detection modes.
1981
- @property (nonatomic) enum GSKCameraSessionDocumentDetection activeDocumentDetection SWIFT_DEPRECATED_MSG("Use activeDetectionMode instead");
1982
- /// True for the duration of taking the photo and processing it. Observable.
1983
- @property (nonatomic, readonly) BOOL isTakingPhoto;
1984
- /// Returns false if flash isn’t supported on this device configuration.
1985
- @property (nonatomic, readonly) BOOL supportsFlash;
1986
- /// Public to be accessible from Objective-C, but should be private otherwise.
1987
- @property (nonatomic, readonly, strong) dispatch_queue_t _Nullable captureSessionQueue;
1988
- @property (nonatomic, readonly, strong) dispatch_queue_t _Nonnull takePhotoQueue;
1989
- - (nonnull instancetype)initWithConfiguration:(GSKCameraSessionConfiguration * _Nonnull)configuration;
1990
- - (void)pauseSession;
1991
- - (void)resumeSession;
1992
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1993
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1994
- @end
1995
-
1996
- @class AVCaptureMetadataOutput;
1997
- @class AVMetadataObject;
1998
- @class AVCaptureConnection;
1999
- @interface GSKCameraSession (SWIFT_EXTENSION(GSSDK)) <AVCaptureMetadataOutputObjectsDelegate>
2000
- - (void)captureOutput:(AVCaptureMetadataOutput * _Nonnull)output didOutputMetadataObjects:(NSArray<AVMetadataObject *> * _Nonnull)metadataObjects fromConnection:(AVCaptureConnection * _Nonnull)connection;
2001
- @end
2002
-
2003
- @interface GSKCameraSession (SWIFT_EXTENSION(GSSDK))
2004
- /// Manually take a photo
2005
- /// If autoTriggerEnabled is true, the photo is taken automatically when the frame is detected.
2006
- /// Otherwise, if you want to let the user manually trigger the photo, you can use this method.
2007
- /// This method can be called even when activeDetectionMode is higlightAndTrigger and will force taking the
2008
- /// photo.
2009
- /// This method is thread-safe.
2010
- /// IMPORTANT: Taking the photo will pause the session. You have to resume the session will <code>resumeSession</code> once
2011
- /// you are done processing the result.
2012
- - (void)takePhoto;
2173
+ @class NSDictionary;
2174
+ @interface GSKBarcodeScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
2175
+ /// Create a configuration from a dictionary.
2176
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
2177
+ /// be used in native projects.
2178
+ + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2179
+ /// Create a configuration from JSON data.
2180
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
2181
+ /// be used in native projects.
2182
+ + (GSKBarcodeScanFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2013
2183
  @end
2014
2184
 
2015
- @class AVCapturePhotoOutput;
2016
- @class AVCaptureResolvedPhotoSettings;
2017
- @interface GSKCameraSession (SWIFT_EXTENSION(GSSDK)) <AVCapturePhotoCaptureDelegate>
2018
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output willBeginCaptureForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings;
2019
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output willCapturePhotoForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings;
2020
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output didCapturePhotoForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings;
2021
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output didFinishProcessingPhoto:(AVCapturePhoto * _Nonnull)photo error:(NSError * _Nullable)error;
2022
- - (void)captureOutput:(AVCapturePhotoOutput * _Nonnull)output didFinishCaptureForResolvedSettings:(AVCaptureResolvedPhotoSettings * _Nonnull)resolvedSettings error:(NSError * _Nullable)error;
2023
- @end
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";
2024
2197
 
2025
- /// The configuration for a camera session.
2026
- SWIFT_CLASS("_TtC5GSSDK29GSKCameraSessionConfiguration")
2027
- @interface GSKCameraSessionConfiguration : NSObject
2028
- /// note:
2029
- /// Deprecated in favor of <code>init(detectionMode:)</code> which allows for more flexible detection modes.
2030
- /// \param documentDetection The type of real-time document detection to apply.
2198
+ /// The result of a barcode scanning flow.
2199
+ /// This class encapsulates the successful outcome of a barcode or QR code scanning session,
2200
+ /// containing the detected barcode or QR code data.
2201
+ SWIFT_CLASS("_TtC5GSSDK24GSKBarcodeScanFlowResult")
2202
+ @interface GSKBarcodeScanFlowResult : NSObject
2203
+ /// The detected barcodes containing their decoded values and types.
2204
+ /// This property provides access to an array of detected codes, each containing
2205
+ /// both the string content and format type (e.g., QR code, Code 128, EAN-13, etc.).
2206
+ /// <ul>
2207
+ /// <li>
2208
+ /// For standard mode: Contains all codes detected in a single frame
2209
+ /// </li>
2210
+ /// <li>
2211
+ /// For batch mode: Contains all codes collected over the scanning session
2212
+ /// </li>
2213
+ /// </ul>
2214
+ @property (nonatomic, readonly, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
2215
+ /// Creates a new barcode scan flow result.
2216
+ /// \param barcodes The detected barcodes.
2031
2217
  ///
2032
- - (nonnull instancetype)initWithDocumentDetection:(enum GSKCameraSessionDocumentDetection)documentDetection OBJC_DESIGNATED_INITIALIZER SWIFT_DEPRECATED_MSG("Use init(detectionMode:) instead");
2033
- /// A session configuration where the document detection is <code>.highlightAndAutoCapture</code>
2034
- - (nonnull instancetype)init;
2218
+ - (nonnull instancetype)initWithBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes OBJC_DESIGNATED_INITIALIZER;
2219
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2220
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2035
2221
  @end
2036
2222
 
2037
- /// The style of document detection to be used during a camera session.
2038
- typedef SWIFT_ENUM(NSInteger, GSKCameraSessionDocumentDetection, open) {
2039
- /// The session doesn’t attempt to detect documents.
2040
- GSKCameraSessionDocumentDetectionNone = 0,
2041
- /// The session detects documents and produces quadrangles
2042
- /// to be used for highlighting the document in the video frames.
2043
- GSKCameraSessionDocumentDetectionHighlight = 1,
2044
- /// The session detects documents and snaps the photo when
2045
- /// the detection is stable.
2046
- GSKCameraSessionDocumentDetectionHighlightAndTrigger = 2,
2047
- };
2223
+ @interface GSKBarcodeScanFlowResult (SWIFT_EXTENSION(GSSDK))
2224
+ /// Returns a dictionary representation of the result
2225
+ /// The dictionary contains:
2226
+ /// <ul>
2227
+ /// <li>
2228
+ /// barcodes: An array of code dictionaries, each containing:
2229
+ /// <ul>
2230
+ /// <li>
2231
+ /// value: The decoded string value
2232
+ /// </li>
2233
+ /// <li>
2234
+ /// type: The code type as a string (e.g., “qr”, “code128”)
2235
+ /// </li>
2236
+ /// </ul>
2237
+ /// </li>
2238
+ /// </ul>
2239
+ @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
2240
+ /// Returns a JSON representation of the result.
2241
+ /// See <code>dictionary</code> for an explanation of the JSON data’s structure.
2242
+ - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
2243
+ @end
2048
2244
 
2049
2245
  /// Represents an error raised by the camera session
2050
2246
  typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
@@ -2059,59 +2255,179 @@ typedef SWIFT_ENUM(NSInteger, GSKCameraSessionError, open) {
2059
2255
  GSKCameraSessionErrorWarnLockDevice = -1003,
2060
2256
  };
2061
2257
 
2062
- typedef SWIFT_ENUM(NSInteger, GSKCameraSessionFlashStatus, open) {
2063
- GSKCameraSessionFlashStatusAuto = 0,
2064
- GSKCameraSessionFlashStatusOn = 1,
2065
- GSKCameraSessionFlashStatusOff = 2,
2066
- };
2067
-
2068
2258
  @class NSCoder;
2069
- @protocol UIViewControllerTransitionCoordinator;
2070
2259
  @class NSBundle;
2071
- /// A ready-to-use camera interface for scanning documents.
2260
+ /// A camera view controller to scan documents or barcodes.
2261
+ /// Inherit from this view controller to create a custom scanning experience. Lay out the <code>cameraView</code> as desired:
2262
+ /// 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.
2264
+ /// note:
2265
+ ///
2266
+ /// When a photo of a document is taken, whether manually or automatically, the capture session is paused
2267
+ /// and a delegate callback (<code>cameraViewController(_:didGenerateScan:)</code>) is called when the photo is ready.
2268
+ /// In this callback, you can decide whether to exit the camera view controller (if you just need to scan a
2269
+ /// single page), or keep scanning more images (to support a “batch scanning” flow). For the latter scenario,
2270
+ /// 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>.
2072
2272
  SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
2073
2273
  @interface GSKCameraViewController : UIViewController
2074
2274
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
2075
- - (nonnull instancetype)initWithCameraSession:(GSKCameraSession * _Nonnull)cameraSession OBJC_DESIGNATED_INITIALIZER;
2076
- @property (nonatomic, readonly) BOOL prefersStatusBarHidden;
2077
- - (void)loadView;
2078
2275
  - (void)viewDidLoad;
2079
2276
  - (void)viewWillAppear:(BOOL)animated;
2080
2277
  - (void)viewWillDisappear:(BOOL)animated;
2081
- - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator> _Nonnull)coordinator;
2278
+ /// Manually trigger a photo.
2279
+ /// Use this to handle the user tapping on a “take photo” button, or your own
2280
+ /// custom logic to take a photo.
2281
+ - (void)takePhoto;
2082
2282
  - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
2083
2283
  @end
2084
2284
 
2085
- @class GSKView;
2086
- @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK)) <GSKViewDelegate>
2087
- - (void)cameraView:(GSKView * _Nonnull)cameraView requestedFocusAtPoint:(CGPoint)focusPoint;
2285
+ @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
2088
2286
  @end
2089
2287
 
2288
+ /// A document detection mode
2289
+ /// When detecting a document, the camera controller can just highlight the document, or also
2290
+ /// highlight and trigger the photo when the detection is stable enough.
2291
+ typedef SWIFT_ENUM(NSInteger, DocumentDetectionMode, open) {
2292
+ /// Visual highlighting only.
2293
+ /// The camera will detect document edges and provide visual feedback by drawing
2294
+ /// a document overlay, but will not automatically capture photos. Users must
2295
+ /// manually trigger photo capture.
2296
+ DocumentDetectionModeHighlightOnly = 0,
2297
+ /// Highlighting with automatic capture.
2298
+ /// Similar to <code>highlightOnly</code>, but the camera will automatically take a photo
2299
+ /// when a stable document is detected for a sufficient duration. This provides
2300
+ /// a hands-free scanning experience.
2301
+ DocumentDetectionModeHighlightAndAutoCapture = 1,
2302
+ };
2303
+
2090
2304
  @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
2091
- /// Snap the photo
2092
- - (void)takePhoto;
2093
2305
  @end
2094
2306
 
2095
- @class GSKScan;
2096
- @class GSKQuadrangle;
2307
+ /// Constants indicating an interruption reason for the camera session.
2308
+ typedef SWIFT_ENUM(NSInteger, InterruptionReason, open) {
2309
+ /// An interruption caused by the app being sent to the background while using a camera.
2310
+ InterruptionReasonVideoDeviceNotAvailableInBackground = 0,
2311
+ /// An interruption caused by the audio hardware temporarily being made unavailable, for instance,
2312
+ /// for a phone call, or alarm.
2313
+ InterruptionReasonAudioDeviceInUseByAnotherClient = 1,
2314
+ /// An interruption caused by the video device temporarily being made unavailable, for instance,
2315
+ /// when stolen away by another app.
2316
+ InterruptionReasonVideoDeviceInUseByAnotherClient = 2,
2317
+ /// An interruption caused when the app is running in a multi-app layout, causing resource contention
2318
+ /// and degraded recording quality of service. Given your present session configuration, the
2319
+ /// session may only be run if your app occupies the full screen.
2320
+ InterruptionReasonVideoDeviceNotAvailableWithMultipleForegroundApps = 3,
2321
+ /// An interruption caused by the video device temporarily being made unavailable due to system pressure,
2322
+ /// such as thermal duress.
2323
+ InterruptionReasonVideoDeviceNotAvailableDueToSystemPressure = 4,
2324
+ InterruptionReasonUnknown = 5,
2325
+ };
2326
+
2097
2327
  @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
2098
- - (void)cameraSessionDidSetup:(GSKCameraSession * _Nonnull)cameraSession;
2099
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession setupFailedWithError:(NSError * _Nonnull)error;
2100
- - (void)cameraSessionWillSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
2101
- - (void)cameraSessionDidSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
2102
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFailToSnapPhotoWithError:(NSError * _Nonnull)error;
2103
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didGenerateScan:(GSKScan * _Nonnull)scan;
2104
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didEncounterFailureWithError:(NSError * _Nonnull)error;
2105
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFailWithError:(NSError * _Nonnull)error;
2106
- - (void)cameraSessionIsSearchingQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
2107
- - (void)cameraSessionIsAboutToChooseQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
2108
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession willAutoTriggerWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
2109
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFindQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
2110
- - (void)cameraSessionFailedToFindQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
2111
- - (void)cameraSessionDidStart:(GSKCameraSession * _Nonnull)cameraSession;
2112
- - (void)cameraSessionDidStop:(GSKCameraSession * _Nonnull)cameraSession;
2113
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession wasInterruptedWithReason:(enum AVCaptureSessionInterruptionReason)reason;
2114
- - (void)cameraSessionInterruptionEnded:(GSKCameraSession * _Nonnull)cameraSession;
2328
+ /// Factory method for a camera view controller with document detection.
2329
+ /// This is only to be used from Objective-C. From Swift, prefer using <code>init(configuration:)</code> instead.
2330
+ /// \param documentDetectionMode The document detection mode.
2331
+ ///
2332
+ /// \param documentOverlayColor The color of the document overlay.
2333
+ ///
2334
+ + (void)makeCameraViewControllerWithDocumentDetectionMode:(enum DocumentDetectionMode)documentDetectionMode documentOverlayColor:(UIColor * _Nonnull)documentOverlayColor completionHandler:(void (^ _Nonnull)(GSKCameraViewController * _Nullable, NSError * _Nullable))completionHandler;
2335
+ @end
2336
+
2337
+ @class GSKQuadrangle;
2338
+ @class GSKScan;
2339
+ SWIFT_PROTOCOL("_TtP5GSSDK31GSKCameraViewControllerDelegate_")
2340
+ @protocol GSKCameraViewControllerDelegate
2341
+ @optional
2342
+ /// The camera view controller failed with an error.
2343
+ /// \param cameraViewController The camera view controller
2344
+ ///
2345
+ /// \param error The encountered error.
2346
+ ///
2347
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFailWithError:(NSError * _Nonnull)error;
2348
+ /// The camera view controller encountered a non-fatal error.
2349
+ /// \param cameraViewController The camera view controller
2350
+ ///
2351
+ /// \param error The encountered error.
2352
+ ///
2353
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didEncounterNonCriticalError:(NSError * _Nonnull)error;
2354
+ /// The camera view controller started running
2355
+ /// \param cameraViewController The camera view controller
2356
+ ///
2357
+ - (void)cameraViewControllerDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
2358
+ /// The camera view controller stopped running
2359
+ /// \param cameraViewController The camera view controller
2360
+ ///
2361
+ - (void)cameraViewControllerDidStop:(GSKCameraViewController * _Nonnull)cameraViewController;
2362
+ /// The camera view controller was interrupted.
2363
+ /// This can happen in various cases, including when the user goes to Split View mode on iPad.
2364
+ /// \param cameraViewController The camera view controller
2365
+ ///
2366
+ /// \param reason The reason why the camera view controller was interrupted.
2367
+ ///
2368
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController wasInterruptedWithReason:(enum InterruptionReason)reason;
2369
+ /// The camera view controller resumes after interruption
2370
+ /// \param cameraViewController The camera view controller
2371
+ ///
2372
+ - (void)cameraViewControllerInterruptionDidEnd:(GSKCameraViewController * _Nonnull)cameraViewController;
2373
+ /// The camera view controller is still looking for a quadrangle.
2374
+ /// This is a general notification about the status of the search: we may or may not have identified
2375
+ /// its edges. If you want to act on identified edges, listen to the <code>cameraViewController:didFindDocumentWithQuadrangle:</code>
2376
+ /// delegate method.
2377
+ /// <ul>
2378
+ /// <li>
2379
+ /// Parameters:
2380
+ /// </li>
2381
+ /// <li>
2382
+ /// cameraViewController: The camera view controller
2383
+ /// </li>
2384
+ /// </ul>
2385
+ - (void)cameraViewControllerIsSearchingForDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
2386
+ /// The camera view controller identified a document in the last frame of the photo stream
2387
+ /// \param cameraViewController The camera view controller
2388
+ ///
2389
+ /// \param quadrangle The quadrangle of the document that has been found.
2390
+ ///
2391
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindDocumentWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
2392
+ /// The camera view controller couldn’t identify a document in the last frame of the photo stream.
2393
+ /// This doesn’t mean that the camera view controller has stopped searching for documents or failed.
2394
+ /// It just means no document has been identified. In this case, you want to clear any overlay.
2395
+ /// \param cameraViewController The camera view controller
2396
+ ///
2397
+ - (void)cameraViewControllerFailedToFindDocument:(GSKCameraViewController * _Nonnull)cameraViewController;
2398
+ /// The camera view controller real-time document detection will soon take the photo of a quadrangle, but if the document
2399
+ /// detection is not stable enough, the process can still be
2400
+ /// cancelled.
2401
+ /// It’s a good time to tell the user to remain stable.
2402
+ /// Only called when the document detection is set to .highlightAndAutoCapture.
2403
+ /// \param cameraViewController The camera view controller
2404
+ ///
2405
+ - (void)cameraViewControllerPhotoStabilizationDidStart:(GSKCameraViewController * _Nonnull)cameraViewController;
2406
+ /// The camera view controller is going to automatically take a photo because the detection was stable enough.
2407
+ /// The photo taking is underway and cannot be interrupted at this stage.
2408
+ /// \param cameraViewController The camera view controller
2409
+ ///
2410
+ /// \param quadrangle The quadrangle of the document that will be photographed.
2411
+ ///
2412
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController willSnapPhotoWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
2413
+ /// The camera view controller just took a photo, but it hasn’t been post-processed it yet
2414
+ /// \param cameraViewController The camera view controller
2415
+ ///
2416
+ - (void)cameraViewControllerDidSnapPhoto:(GSKCameraViewController * _Nonnull)cameraViewController;
2417
+ /// The camera view controller has finished processing the photo we just took.
2418
+ /// \param cameraViewController The camera view controller
2419
+ ///
2420
+ /// \param scan The scan object that has been generated. The image contained in the scan object is the full,
2421
+ /// unprocessed image in which the document was detected. Use <code>GSKScanProcessor</code> to process and
2422
+ /// warp and enhance the scanned document.
2423
+ ///
2424
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didGenerateScan:(GSKScan * _Nonnull)scan;
2425
+ /// Camera view controller has detected barcodes.
2426
+ /// \param cameraViewController The camera view controller
2427
+ ///
2428
+ /// \param barcodes The detected barcodes
2429
+ ///
2430
+ - (void)cameraViewController:(GSKCameraViewController * _Nonnull)cameraViewController didFindBarcodes:(NSArray<GSKBarcode *> * _Nonnull)barcodes;
2115
2431
  @end
2116
2432
 
2117
2433
  /// The type of document detected by the document finder.
@@ -2233,6 +2549,36 @@ SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
2233
2549
  - (NSString * _Nullable)process:(NSString * _Nonnull)inputFilePath SWIFT_WARN_UNUSED_RESULT;
2234
2550
  @end
2235
2551
 
2552
+ @class UIImage;
2553
+ @class UIView;
2554
+ SWIFT_CLASS("_TtC5GSSDK26GSKEditFrameViewController")
2555
+ @interface GSKEditFrameViewController : UIViewController
2556
+ /// The image on which the quadrangle is overlaid.
2557
+ @property (nonatomic, strong) UIImage * _Nonnull image;
2558
+ @property (nonatomic, readonly, strong) UIView * _Nonnull frameView;
2559
+ /// Used to set the quadrangle to display in the view controller, and to retrieve the new quadrangle edited by the user.
2560
+ @property (nonatomic, strong) GSKQuadrangle * _Nonnull quadrangle;
2561
+ /// Customize the color of the shade within the quadrangle.
2562
+ @property (nonatomic, strong) UIColor * _Nonnull shadeColor SWIFT_DEPRECATED_MSG("Deprecated in favor of frameView.imageSelection.insideShadeColor.");
2563
+ /// Customize the color of the shade outside the quadrangle.
2564
+ @property (nonatomic, strong) UIColor * _Nonnull outsideShadeColor;
2565
+ /// Customize the color of the line used to draw the quadrangle.
2566
+ @property (nonatomic, strong) UIColor * _Nonnull lineColor;
2567
+ /// Customize the width of the corner handles.
2568
+ @property (nonatomic) CGFloat handleWidth;
2569
+ /// Customize the magnifier center style shown while dragging corners.
2570
+ @property (nonatomic) GSKMagnifierViewCenterStyle magnifierViewCenterStyle;
2571
+ /// \param image The image on which to draw the quadrangle. This is typically the original photo from the camera.
2572
+ ///
2573
+ /// \param quadrangle The initial quadrangle to display.
2574
+ ///
2575
+ - (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image quadrangle:(GSKQuadrangle * _Nonnull)quadrangle OBJC_DESIGNATED_INITIALIZER;
2576
+ - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
2577
+ - (void)setQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle animated:(BOOL)animated;
2578
+ - (void)viewDidLoad;
2579
+ - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil SWIFT_UNAVAILABLE;
2580
+ @end
2581
+
2236
2582
  /// A configuration to specify the background cleaning to apply with GSKScanProcessor.
2237
2583
  SWIFT_CLASS("_TtC5GSSDK40GSKFilterBackgroundCleaningConfiguration")
2238
2584
  @interface GSKFilterBackgroundCleaningConfiguration : NSObject
@@ -2398,6 +2744,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLig
2398
2744
  - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
2399
2745
  @end
2400
2746
 
2747
+ typedef SWIFT_ENUM(NSInteger, GSKFlashStatus, open) {
2748
+ GSKFlashStatusAuto = 0,
2749
+ GSKFlashStatusOn = 1,
2750
+ GSKFlashStatusOff = 2,
2751
+ };
2752
+
2401
2753
  enum GSKIntegrationFramework : NSInteger;
2402
2754
  SWIFT_CLASS_NAMED("GSKIntegrationContext")
2403
2755
  @interface GSKIntegrationContext : NSObject
@@ -2532,186 +2884,6 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
2532
2884
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2533
2885
  @end
2534
2886
 
2535
- @class GSKReadableCodeFlowConfiguration;
2536
- @class GSKReadableCodeFlowResult;
2537
- /// A flow for scanning readable codes (barcodes, QR codes, etc.)
2538
- SWIFT_CLASS("_TtC5GSSDK19GSKReadableCodeFlow")
2539
- @interface GSKReadableCodeFlow : NSObject
2540
- /// Initializes a new readable code flow
2541
- /// \param configuration Configuration for the readable code scanning
2542
- ///
2543
- - (nonnull instancetype)initWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
2544
- /// Starts the readable code scanning flow by presenting a full-screen camera interface.
2545
- /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
2546
- /// The scanning process respects the code types specified in the flow’s configuration.
2547
- /// The method uses Swift’s async/await pattern, suspending until either:
2548
- /// <ul>
2549
- /// <li>
2550
- /// A readable code is successfully detected (except in batch mode)
2551
- /// </li>
2552
- /// <li>
2553
- /// The user taps the done button (batch mode)
2554
- /// </li>
2555
- /// <li>
2556
- /// The user cancels the operation
2557
- /// </li>
2558
- /// <li>
2559
- /// An error occurs during setup or scanning
2560
- /// </li>
2561
- /// </ul>
2562
- /// The behavior varies based on the configuration’s isBatchModeEnabled:
2563
- /// <ul>
2564
- /// <li>
2565
- /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
2566
- /// </li>
2567
- /// <li>
2568
- /// <code>true</code>: Collects unique codes over time until the user taps the done button
2569
- /// </li>
2570
- /// </ul>
2571
- /// Example usage:
2572
- /// \code
2573
- /// let flow = GSKReadableCodeFlow()
2574
- /// do {
2575
- /// let result = try await flow.resultByStarting(fromViewController: self)
2576
- /// print("Scanned codes: \(result.readableCodes.map { $0.value })")
2577
- /// } catch GSKReadableCodeFlowError.userCancellation {
2578
- /// print("User canceled scanning")
2579
- /// } catch {
2580
- /// print("Scanning failed: \(error)")
2581
- /// }
2582
- ///
2583
- /// \endcodeimportant:
2584
- /// This method requires camera permissions. Ensure your app’s Info.plist includes
2585
- /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
2586
- /// note:
2587
- /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
2588
- /// for an immersive scanning experience.
2589
- /// \param viewController The view controller from which to present the camera interface.
2590
- /// This should typically be the currently visible view controller.
2591
- ///
2592
- ///
2593
- /// throws:
2594
- ///
2595
- /// <ul>
2596
- /// <li>
2597
- /// Typically throws a <code>GSKReadableCodeFlowError</code>
2598
- /// </li>
2599
- /// </ul>
2600
- ///
2601
- /// returns:
2602
- /// A <code>GSKReadableCodeFlowResult</code> containing the detected readable codes with their
2603
- /// decoded values and format types.
2604
- - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nullable, NSError * _Nullable))completionHandler;
2605
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2606
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2607
- @end
2608
-
2609
- @class NSError;
2610
- @interface GSKReadableCodeFlow (SWIFT_EXTENSION(GSSDK))
2611
- /// Instantiates a <code>GSKReadableCodeFlow</code> instance with the provided configuration.
2612
- /// This initializer is only available from Objective-C.
2613
- + (nonnull instancetype)readableCodeFlowWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
2614
- /// Starts the readable code scanning flow.
2615
- /// @param viewController The view controller to present the readable code scanning interface from.
2616
- /// @param successBlock A completion block/closure that will be called on the main
2617
- /// thread upon successful completion of the scan flow. It receives a <code>GSKReadableCodeFlowResult</code> object as
2618
- /// a parameter. This object gives you access to the scanned codes.
2619
- /// @param failureBlock A block/closure called if an error was encountered.
2620
- /// This method is only available from Objective-C.
2621
- - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
2622
- @end
2623
-
2624
- @class UIColor;
2625
- /// Configuration for the UI readable code scanning flow
2626
- /// This class allows customization of which barcode and QR code formats should be detected
2627
- /// during the scanning process. By default, all supported formats are enabled.
2628
- SWIFT_CLASS("_TtC5GSSDK32GSKReadableCodeFlowConfiguration")
2629
- @interface GSKReadableCodeFlowConfiguration : NSObject
2630
- /// Whether batch mode is enabled for code detection.
2631
- /// This setting controls how codes are detected and when they are returned:
2632
- /// <ul>
2633
- /// <li>
2634
- /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
2635
- /// </li>
2636
- /// <li>
2637
- /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
2638
- /// </li>
2639
- /// </ul>
2640
- /// Example:
2641
- /// \code
2642
- /// // Standard mode - return codes immediately (default)
2643
- /// let standardConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: false)
2644
- ///
2645
- /// // Batch mode - collect codes over time
2646
- /// let batchConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: true)
2647
- ///
2648
- /// \endcode
2649
- @property (nonatomic) BOOL isBatchModeEnabled;
2650
- /// The highlight color used for the UI (overlay). Defaults
2651
- /// to <code>.green</code>. For good constrast, we recommend using a bright color.
2652
- @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
2653
- /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
2654
- /// default color will be used (blue on iOS, for example).
2655
- @property (nonatomic, strong) UIColor * _Nullable menuColor;
2656
- /// Creates a new readable code flow configuration with default values
2657
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
2658
- @end
2659
-
2660
- @interface GSKReadableCodeFlowConfiguration (SWIFT_EXTENSION(GSSDK))
2661
- /// Create a configuration from a dictionary.
2662
- /// This is used for interfacing with cross-platform plugins but shouldn’t
2663
- /// be used in native projects.
2664
- + (GSKReadableCodeFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2665
- /// Create a configuration from JSON data.
2666
- /// This is used for interfacing with cross-platform plugins but shouldn’t
2667
- /// be used in native projects.
2668
- + (GSKReadableCodeFlowConfiguration * _Nullable)configurationWithJSON:(NSString * _Nonnull)json error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
2669
- @end
2670
-
2671
- /// Enum that defines various errors that can occur during a readable code flow.
2672
- typedef SWIFT_ENUM(NSInteger, GSKReadableCodeFlowError, open) {
2673
- /// User has canceled the readable code flow
2674
- GSKReadableCodeFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 0,
2675
- /// A general error due to a bad configuration parameter
2676
- GSKReadableCodeFlowConfigurationError SWIFT_COMPILE_NAME("configuration") = 1,
2677
- /// Camera permission was denied
2678
- GSKReadableCodeFlowPermissionDeniedError SWIFT_COMPILE_NAME("permissionDenied") = 2,
2679
- /// Failed to initialize the barcode detector
2680
- GSKReadableCodeFlowDetectorError SWIFT_COMPILE_NAME("detectorError") = 3,
2681
- };
2682
- static NSString * _Nonnull const GSKReadableCodeFlowErrorDomain = @"GSSDK.GSKReadableCodeFlowError";
2683
-
2684
- /// The result of a readable code scanning flow
2685
- /// This class encapsulates the successful outcome of a readable code scanning session,
2686
- /// containing the detected barcode or QR code data.
2687
- SWIFT_CLASS("_TtC5GSSDK25GSKReadableCodeFlowResult")
2688
- @interface GSKReadableCodeFlowResult : NSObject
2689
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2690
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2691
- @end
2692
-
2693
- @interface GSKReadableCodeFlowResult (SWIFT_EXTENSION(GSSDK))
2694
- /// Returns a dictionary representation of the result
2695
- /// The dictionary contains:
2696
- /// <ul>
2697
- /// <li>
2698
- /// readableCodes: An array of code dictionaries, each containing:
2699
- /// <ul>
2700
- /// <li>
2701
- /// value: The decoded string value
2702
- /// </li>
2703
- /// <li>
2704
- /// type: The code type as a string (e.g., “qr”, “code128”)
2705
- /// </li>
2706
- /// </ul>
2707
- /// </li>
2708
- /// </ul>
2709
- @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
2710
- /// Returns a JSON representation of the result.
2711
- /// See <code>dictionary</code> for an explanation of the JSON data’s structure.
2712
- - (NSString * _Nonnull)json SWIFT_WARN_UNUSED_RESULT;
2713
- @end
2714
-
2715
2887
  typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
2716
2888
  GSKReceiptCategoryGas = 0,
2717
2889
  GSKReceiptCategoryTransportation = 1,
@@ -2861,7 +3033,7 @@ typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
2861
3033
  };
2862
3034
 
2863
3035
  /// The different possible filters for the scanner UI.
2864
- /// All cases match <code>GSKFilterType</code> values except <code>.automatic</code>.
3036
+ /// Each case maps to a predefined filter configuration except <code>.automatic</code>.
2865
3037
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
2866
3038
  GSKScanFlowFilterNone SWIFT_COMPILE_NAME("none") = 0,
2867
3039
  /// Automatic filter
@@ -2977,7 +3149,7 @@ SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
2977
3149
  /// If OCR was performed, the recognized text.
2978
3150
  @property (nonatomic, strong) GSKScanFlowOCRResult * _Nullable ocrResult;
2979
3151
  /// If structured data extraction was performed, the structured data.
2980
- @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredDataResult;
3152
+ @property (nonatomic, strong) GSKScanFlowStructuredDataResult * _Nullable structuredData;
2981
3153
  - (nonnull instancetype)initWithOriginalFilePath:(NSString * _Nonnull)originalFilePath enhancedFilePath:(NSString * _Nonnull)enhancedFilePath OBJC_DESIGNATED_INITIALIZER;
2982
3154
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2983
3155
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@@ -3007,6 +3179,8 @@ SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
3007
3179
  /// Present if receipt extraction was requested and a receipt/invoice was
3008
3180
  /// successfully extracted, <code>nil</code> otherwise.
3009
3181
  @property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
3182
+ /// Present if barcode extraction was requested and codes were successfully extracted, empty otherwise.
3183
+ @property (nonatomic, copy) NSArray<GSKBarcode *> * _Nonnull barcodes;
3010
3184
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3011
3185
  @end
3012
3186
 
@@ -3175,12 +3349,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
3175
3349
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
3176
3350
  @end
3177
3351
 
3178
- @interface GSKView (SWIFT_EXTENSION(GSSDK))
3179
- - (void)startSearchAnimation;
3180
- - (void)startSnapAnimationWithDuration:(NSTimeInterval)duration;
3181
- - (void)endSnapAnimation;
3182
- @end
3183
-
3184
3352
  SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")
3185
3353
  @interface GSSDKResources : NSObject
3186
3354
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _Nonnull bundle;)