@thegrizzlylabs/react-native-genius-scan 5.11.1 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +1 -0
  2. package/android/build.gradle +1 -1
  3. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKView.h +5 -0
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +206 -13
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +2322 -323
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +68 -4
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +68 -4
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.stringsdict +0 -0
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.strings +0 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/he.lproj/GSSDK.strings +0 -0
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/id.lproj/GSSDK.stringsdict +0 -0
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.strings +0 -0
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/it.lproj/GSSDK.stringsdict +0 -0
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.strings +0 -0
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
  38. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
  44. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
  45. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/tr.lproj/GSSDK.strings +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.strings +0 -0
  48. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
  49. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
  50. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
  51. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
  52. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/zh-Hant.lproj/GSSDK.stringsdict +0 -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/GSKView.h +5 -0
  55. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +412 -26
  56. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  57. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +2322 -323
  58. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +68 -4
  59. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  60. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +68 -4
  61. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +2322 -323
  62. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +68 -4
  63. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  64. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +68 -4
  65. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.strings +0 -0
  66. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ar.lproj/GSSDK.stringsdict +0 -0
  67. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.strings +0 -0
  68. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/da.lproj/GSSDK.stringsdict +0 -0
  69. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.strings +0 -0
  70. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/de.lproj/GSSDK.stringsdict +0 -0
  71. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  72. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.stringsdict +0 -0
  73. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.strings +0 -0
  74. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/es.lproj/GSSDK.stringsdict +0 -0
  75. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  76. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.stringsdict +0 -0
  77. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/he.lproj/GSSDK.strings +0 -0
  78. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/he.lproj/GSSDK.stringsdict +0 -0
  79. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.strings +0 -0
  80. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/hu.lproj/GSSDK.stringsdict +0 -0
  81. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/id.lproj/GSSDK.strings +0 -0
  82. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/id.lproj/GSSDK.stringsdict +0 -0
  83. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/it.lproj/GSSDK.strings +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.strings +0 -0
  86. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ja.lproj/GSSDK.stringsdict +0 -0
  87. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.strings +0 -0
  88. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ko.lproj/GSSDK.stringsdict +0 -0
  89. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.strings +0 -0
  90. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/nl.lproj/GSSDK.stringsdict +0 -0
  91. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.strings +0 -0
  92. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pl.lproj/GSSDK.stringsdict +0 -0
  93. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.strings +0 -0
  94. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/pt-BR.lproj/GSSDK.stringsdict +0 -0
  95. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.strings +0 -0
  96. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/ru.lproj/GSSDK.stringsdict +0 -0
  97. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.strings +0 -0
  98. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/sv.lproj/GSSDK.stringsdict +0 -0
  99. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.strings +0 -0
  100. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/tr.lproj/GSSDK.stringsdict +0 -0
  101. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.strings +0 -0
  102. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/vi.lproj/GSSDK.stringsdict +0 -0
  103. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.strings +0 -0
  104. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hans.lproj/GSSDK.stringsdict +0 -0
  105. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hant.lproj/GSSDK.strings +0 -0
  106. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/zh-Hant.lproj/GSSDK.stringsdict +0 -0
  107. package/package.json +1 -1
package/README.md CHANGED
@@ -101,6 +101,7 @@ The method `scanWithConfiguration` takes a `configuration` parameter which can t
101
101
  - `pdfMaxScanDimension`: max dimension in pixels when images are scaled before PDF generation, for example 2000 to fit both height and width within 2000px. Defaults to 0, which means no scaling is performed.
102
102
  - `pdfFontFileUrl`: Custom font file used during the PDF generation to embed an invisible text layer. If null, a default font is used, which only supports Latin languages.
103
103
  - `jpegQuality`: JPEG quality used to compress captured images. Between 0 and 100, 100 being the best quality. Default is 60.
104
+ - `skipPostProcessingScreen`: Whether to skip showing the post-processing screen. We only recommend enabling this option when scanning structured data. Generally, you want the user to visually confirm the quality of each scan.
104
105
  - `postProcessingActions`: an array with the desired actions to display during the post processing screen (defaults to all actions). Possible actions are `rotate`, `editFilter` and `correctDistortion`.
105
106
  - `defaultCurvatureCorrection`: `enabled` or `disabled` whether a curvature correction should be applied by default. Disabled by default.
106
107
  - `defaultScanOrientation`: `automatic` to rotate scan automatically after capture or `original` to keep original scan orientation (defaults to `automatic`).
@@ -41,5 +41,5 @@ rootProject.allprojects {
41
41
 
42
42
  dependencies {
43
43
  implementation 'com.facebook.react:react-native:+'
44
- implementation 'com.geniusscansdk:gssdk:5.11.1'
44
+ implementation 'com.geniusscansdk:gssdk:5.13.0'
45
45
  }
@@ -48,6 +48,11 @@ NS_ASSUME_NONNULL_BEGIN
48
48
  */
49
49
  - (void)resumePreview;
50
50
 
51
+ /**
52
+ Returns the metadata output rect converted to the preview layer's coordinates.
53
+ */
54
+ - (CGRect)layerRectConvertedFromMetadataOutputRect:(CGRect)rect;
55
+
51
56
  @property (nonatomic, readonly) UIView *previewView;
52
57
 
53
58
  /**
@@ -372,11 +372,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDu
372
372
  /// The flash mode. Default is .auto.
373
373
  @property (nonatomic) enum GSKCameraSessionFlashStatus flashStatus;
374
374
  /// Returns the current status of the document detection.
375
- /// While you can configure the desired mode when setting up the session, the current value can change: for instance, the
376
- /// active document detection is <code>.none</code> while taking the photo, or when the session is paused, even if the requested
377
- /// detection is <code>.highlightAndTrigger</code>.
375
+ /// This is a computed property that maps to the new activeDetectionMode property for backward compatibility.
378
376
  /// Observable.
379
- @property (nonatomic) enum GSKCameraSessionDocumentDetection activeDocumentDetection;
377
+ /// important:
378
+ /// This property is deprecated. Use <code>activeDetectionMode</code> instead, which supports both document and readable
379
+ /// code detection modes.
380
+ @property (nonatomic) enum GSKCameraSessionDocumentDetection activeDocumentDetection SWIFT_DEPRECATED_MSG("Use activeDetectionMode instead");
380
381
  /// True for the duration of taking the photo and processing it. Observable.
381
382
  @property (nonatomic, readonly) BOOL isTakingPhoto;
382
383
  /// Returns false if flash isn’t supported on this device configuration.
@@ -391,6 +392,14 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDu
391
392
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
392
393
  @end
393
394
 
395
+ @class AVCaptureMetadataOutput;
396
+ @class AVMetadataObject;
397
+ @class AVCaptureConnection;
398
+
399
+ @interface GSKCameraSession (SWIFT_EXTENSION(GSSDK)) <AVCaptureMetadataOutputObjectsDelegate>
400
+ - (void)captureOutput:(AVCaptureMetadataOutput * _Nonnull)output didOutputMetadataObjects:(NSArray<AVMetadataObject *> * _Nonnull)metadataObjects fromConnection:(AVCaptureConnection * _Nonnull)connection;
401
+ @end
402
+
394
403
 
395
404
 
396
405
 
@@ -425,10 +434,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSTimeInterval minDu
425
434
  /// The configuration for a camera session.
426
435
  SWIFT_CLASS("_TtC5GSSDK29GSKCameraSessionConfiguration")
427
436
  @interface GSKCameraSessionConfiguration : NSObject
437
+ /// note:
438
+ /// Deprecated in favor of <code>init(detectionMode:)</code> which allows for more flexible detection modes.
428
439
  /// \param documentDetection The type of real-time document detection to apply.
429
440
  ///
430
- - (nonnull instancetype)initWithDocumentDetection:(enum GSKCameraSessionDocumentDetection)documentDetection OBJC_DESIGNATED_INITIALIZER;
431
- /// A session configuration where the document detection is <code>.highlightAndTrigger</code>
441
+ - (nonnull instancetype)initWithDocumentDetection:(enum GSKCameraSessionDocumentDetection)documentDetection OBJC_DESIGNATED_INITIALIZER SWIFT_DEPRECATED_MSG("Use init(detectionMode:) instead");
442
+ /// A session configuration where the document detection is <code>.highlightAndAutoCapture</code>
432
443
  - (nonnull instancetype)init;
433
444
  @end
434
445
 
@@ -488,12 +499,12 @@ SWIFT_CLASS("_TtC5GSSDK23GSKCameraViewController")
488
499
  @end
489
500
 
490
501
 
491
-
492
502
  @interface GSKCameraViewController (SWIFT_EXTENSION(GSSDK))
493
503
  /// Snap the photo
494
504
  - (void)takePhoto;
495
505
  @end
496
506
 
507
+
497
508
  @class GSKScan;
498
509
  @class GSKQuadrangle;
499
510
 
@@ -931,6 +942,188 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
931
942
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
932
943
  @end
933
944
 
945
+ @class GSKReadableCodeFlowConfiguration;
946
+ @class GSKReadableCodeFlowResult;
947
+
948
+ /// A flow for scanning readable codes (barcodes, QR codes, etc.)
949
+ SWIFT_CLASS("_TtC5GSSDK19GSKReadableCodeFlow")
950
+ @interface GSKReadableCodeFlow : NSObject
951
+ /// Initializes a new readable code flow
952
+ /// \param configuration Configuration for the readable code scanning
953
+ ///
954
+ - (nonnull instancetype)initWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
955
+ /// Starts the readable code scanning flow by presenting a full-screen camera interface.
956
+ /// This method presents a camera view controller that continuously scans for barcodes and QR codes.
957
+ /// The scanning process respects the code types specified in the flow’s configuration.
958
+ /// The method uses Swift’s async/await pattern, suspending until either:
959
+ /// <ul>
960
+ /// <li>
961
+ /// A readable code is successfully detected (except in batch mode)
962
+ /// </li>
963
+ /// <li>
964
+ /// The user taps the done button (batch mode)
965
+ /// </li>
966
+ /// <li>
967
+ /// The user cancels the operation
968
+ /// </li>
969
+ /// <li>
970
+ /// An error occurs during setup or scanning
971
+ /// </li>
972
+ /// </ul>
973
+ /// The behavior varies based on the configuration’s isBatchModeEnabled:
974
+ /// <ul>
975
+ /// <li>
976
+ /// <code>false</code>: Returns immediately after detecting one or more codes in a single frame
977
+ /// </li>
978
+ /// <li>
979
+ /// <code>true</code>: Collects unique codes over time until the user taps the done button
980
+ /// </li>
981
+ /// </ul>
982
+ /// Example usage:
983
+ /// \code
984
+ /// let flow = GSKReadableCodeFlow()
985
+ /// do {
986
+ /// let result = try await flow.resultByStarting(fromViewController: self)
987
+ /// print("Scanned codes: \(result.readableCodes.map { $0.value })")
988
+ /// } catch GSKReadableCodeFlowError.userCancellation {
989
+ /// print("User canceled scanning")
990
+ /// } catch {
991
+ /// print("Scanning failed: \(error)")
992
+ /// }
993
+ ///
994
+ /// \endcodeimportant:
995
+ /// This method requires camera permissions. Ensure your app’s Info.plist includes
996
+ /// the <code>NSCameraUsageDescription</code> key with an appropriate description.
997
+ /// note:
998
+ /// The camera interface is presented with <code>modalPresentationStyle</code> set to <code>.fullScreen</code>
999
+ /// for an immersive scanning experience.
1000
+ /// \param viewController The view controller from which to present the camera interface.
1001
+ /// This should typically be the currently visible view controller.
1002
+ ///
1003
+ ///
1004
+ /// throws:
1005
+ ///
1006
+ /// <ul>
1007
+ /// <li>
1008
+ /// Typically throws a <code>GSKReadableCodeFlowError</code>
1009
+ /// </li>
1010
+ /// </ul>
1011
+ ///
1012
+ /// returns:
1013
+ /// A <code>GSKReadableCodeFlowResult</code> containing the detected readable codes with their
1014
+ /// decoded values and format types.
1015
+ - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nullable, NSError * _Nullable))completionHandler;
1016
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1017
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1018
+ @end
1019
+
1020
+ @class NSError;
1021
+
1022
+ @interface GSKReadableCodeFlow (SWIFT_EXTENSION(GSSDK))
1023
+ /// Instantiates a <code>GSKReadableCodeFlow</code> instance with the provided configuration.
1024
+ /// This initializer is only available from Objective-C.
1025
+ + (nonnull instancetype)readableCodeFlowWithConfiguration:(GSKReadableCodeFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
1026
+ /// Starts the readable code scanning flow.
1027
+ /// @param viewController The view controller to present the readable code scanning interface from.
1028
+ /// @param successBlock A completion block/closure that will be called on the main
1029
+ /// thread upon successful completion of the scan flow. It receives a <code>GSKReadableCodeFlowResult</code> object as
1030
+ /// a parameter. This object gives you access to the scanned codes.
1031
+ /// @param failureBlock A block/closure called if an error was encountered.
1032
+ /// This method is only available from Objective-C.
1033
+ - (void)startFromViewController:(UIViewController * _Nonnull)viewController success:(void (^ _Nonnull)(GSKReadableCodeFlowResult * _Nonnull))successBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))failureBlock;
1034
+ @end
1035
+
1036
+ @class UIColor;
1037
+
1038
+ /// Configuration for the UI readable code scanning flow
1039
+ /// This class allows customization of which barcode and QR code formats should be detected
1040
+ /// during the scanning process. By default, all supported formats are enabled.
1041
+ SWIFT_CLASS("_TtC5GSSDK32GSKReadableCodeFlowConfiguration")
1042
+ @interface GSKReadableCodeFlowConfiguration : NSObject
1043
+ /// Whether batch mode is enabled for code detection.
1044
+ /// This setting controls how codes are detected and when they are returned:
1045
+ /// <ul>
1046
+ /// <li>
1047
+ /// <code>false</code>: Detect multiple codes simultaneously in a single frame and return immediately (default)
1048
+ /// </li>
1049
+ /// <li>
1050
+ /// <code>true</code>: Collect multiple codes over time before returning when user taps Done
1051
+ /// </li>
1052
+ /// </ul>
1053
+ /// Example:
1054
+ /// \code
1055
+ /// // Standard mode - return codes immediately (default)
1056
+ /// let standardConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: false)
1057
+ ///
1058
+ /// // Batch mode - collect codes over time
1059
+ /// let batchConfig = GSKReadableCodeFlowConfiguration(isBatchModeEnabled: true)
1060
+ ///
1061
+ /// \endcode
1062
+ @property (nonatomic) BOOL isBatchModeEnabled;
1063
+ /// The highlight color used for the UI (overlay). Defaults
1064
+ /// to <code>.green</code>. For good constrast, we recommend using a bright color.
1065
+ @property (nonatomic, strong) UIColor * _Nonnull highlightColor;
1066
+ /// The menu color used for the UI. Defaults to <code>nil</code>, meaning that the system
1067
+ /// default color will be used (blue on iOS, for example).
1068
+ @property (nonatomic, strong) UIColor * _Nullable menuColor;
1069
+ /// Creates a new readable code flow configuration with default values
1070
+ - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1071
+ @end
1072
+
1073
+
1074
+ @interface GSKReadableCodeFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1075
+ /// Create a configuration from a dictionary.
1076
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
1077
+ /// be used in native projects.
1078
+ + (GSKReadableCodeFlowConfiguration * _Nullable)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1079
+ @end
1080
+
1081
+
1082
+
1083
+
1084
+ /// Enum that defines various errors that can occur during a readable code flow.
1085
+ typedef SWIFT_ENUM(NSInteger, GSKReadableCodeFlowError, open) {
1086
+ /// User has canceled the readable code flow
1087
+ GSKReadableCodeFlowUserCancelationError SWIFT_COMPILE_NAME("userCancellation") = 0,
1088
+ /// A general error due to a bad configuration parameter
1089
+ GSKReadableCodeFlowConfigurationError SWIFT_COMPILE_NAME("configuration") = 1,
1090
+ /// Camera permission was denied
1091
+ GSKReadableCodeFlowPermissionDeniedError SWIFT_COMPILE_NAME("permissionDenied") = 2,
1092
+ /// Failed to initialize the barcode detector
1093
+ GSKReadableCodeFlowDetectorError SWIFT_COMPILE_NAME("detectorError") = 3,
1094
+ };
1095
+ static NSString * _Nonnull const GSKReadableCodeFlowErrorDomain = @"GSSDK.GSKReadableCodeFlowError";
1096
+
1097
+
1098
+ /// The result of a readable code scanning flow
1099
+ /// This class encapsulates the successful outcome of a readable code scanning session,
1100
+ /// containing the detected barcode or QR code data.
1101
+ SWIFT_CLASS("_TtC5GSSDK25GSKReadableCodeFlowResult")
1102
+ @interface GSKReadableCodeFlowResult : NSObject
1103
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1104
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1105
+ @end
1106
+
1107
+
1108
+ @interface GSKReadableCodeFlowResult (SWIFT_EXTENSION(GSSDK))
1109
+ /// Returns a dictionary representation of the result
1110
+ /// The dictionary contains:
1111
+ /// <ul>
1112
+ /// <li>
1113
+ /// readableCodes: An array of code dictionaries, each containing:
1114
+ /// <ul>
1115
+ /// <li>
1116
+ /// value: The decoded string value
1117
+ /// </li>
1118
+ /// <li>
1119
+ /// type: The code type as a string (e.g., “qr”, “code128”)
1120
+ /// </li>
1121
+ /// </ul>
1122
+ /// </li>
1123
+ /// </ul>
1124
+ @property (nonatomic, readonly, copy) NSDictionary<NSString *, id> * _Nonnull dictionary;
1125
+ @end
1126
+
934
1127
  typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
935
1128
  GSKReceiptCategoryGas = 0,
936
1129
  GSKReceiptCategoryTransportation = 1,
@@ -984,7 +1177,6 @@ enum GSKScanFlowFilterType : NSInteger;
984
1177
  enum GSKScanFlowPDFPageSize : NSUInteger;
985
1178
  enum GSKScanFlowFlashMode : NSUInteger;
986
1179
  enum GSKScanFlowMultiPageFormat : NSUInteger;
987
- @class UIColor;
988
1180
  @class GSKScanFlowOCRConfiguration;
989
1181
 
990
1182
  /// Enables configuration of a <code>GSKScanFlow</code> instance.
@@ -1062,20 +1254,20 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1062
1254
  @end
1063
1255
 
1064
1256
 
1257
+ @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1258
+ - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
1259
+ @end
1260
+
1065
1261
 
1066
1262
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1067
1263
  /// Create a configuration from a dictionary.
1068
- /// This is particularly useful for interfacing with React Native but shouldn’t
1264
+ /// This is used for interfacing with cross-platform plugins but shouldn’t
1069
1265
  /// be used in native projects.
1070
1266
  + (nullable instancetype)configurationWithDictionary:(NSDictionary * _Nonnull)dictionary error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT;
1071
1267
  @end
1072
1268
 
1073
1269
 
1074
1270
 
1075
- @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1076
- - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
1077
- @end
1078
-
1079
1271
  /// Enum that defines various errors that can occur during a scan flow.
1080
1272
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
1081
1273
  /// User has canceled the scan flow
@@ -1451,6 +1643,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
1451
1643
 
1452
1644
 
1453
1645
 
1646
+
1454
1647
  @interface UIViewController (SWIFT_EXTENSION(GSSDK))
1455
1648
  /// Return a status bar style appropriate for this view controller
1456
1649
  /// based on the contrast between the status bar’s contents and the