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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +21 -0
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/geniusscansdk/reactnative/RNGeniusScanModule.java +9 -4
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Assets.car +0 -0
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowError+PluginPayload.h +11 -0
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +6 -4
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +91 -54
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +1 -3
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/UIImage+GSKUtils.h +5 -1
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +1975 -1090
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +56 -49
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +56 -49
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Assets.car +0 -0
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/DeviceGuru_DeviceGuru.bundle/Info.plist +0 -0
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +5 -3
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKQuadrangle.h +1 -7
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowError+PluginPayload.h +11 -0
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +6 -4
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +182 -108
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +1 -3
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/UIImage+GSKUtils.h +5 -1
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1975 -1090
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +56 -49
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +56 -49
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1975 -1090
  38. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +56 -49
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +56 -49
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_GSKPhoneNumberKit.bundle/Info.plist +0 -0
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/fr.lproj/GSSDK.strings +0 -0
  44. package/ios/RNGeniusScan.m +22 -7
  45. package/package.json +1 -1
  46. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEditableFrame.h +0 -67
  47. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  48. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKShutterView.h +0 -28
  49. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEditableFrame.h +0 -67
  50. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKMBProgressHUD.h +0 -410
  51. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKShutterView.h +0 -28
@@ -1,7 +1,7 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
2
+ // swift-compiler-version: Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
3
3
  // swift-module-flags: -target x86_64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name GSSDK
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
4
+ // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.3
5
5
  import AVFoundation
6
6
  import Combine
7
7
  import Contacts
@@ -49,22 +49,6 @@ import _SwiftConcurrencyShims
49
49
  @objc override dynamic public init()
50
50
  @objc deinit
51
51
  }
52
- @objc public enum GSKBarcodeScanFlowError : Swift.Int, Swift.Error {
53
- @objc(GSKBarcodeScanFlowUserCancelationError) case userCancellation
54
- @objc(GSKBarcodeScanFlowConfigurationError) case configuration
55
- @objc(GSKBarcodeScanFlowPermissionDeniedError) case permissionDenied
56
- @objc(GSKBarcodeScanFlowDetectorError) case detectorError
57
- #if compiler(>=5.3) && $NonescapableTypes
58
- public init?(rawValue: Swift.Int)
59
- #endif
60
- public typealias RawValue = Swift.Int
61
- public static var _nsErrorDomain: Swift.String {
62
- get
63
- }
64
- public var rawValue: Swift.Int {
65
- get
66
- }
67
- }
68
52
  extension GSSDK.GSKBarcodeScanFlowResult {
69
53
  @objc dynamic public var dictionary: [Swift.String : Any] {
70
54
  @objc get
@@ -209,6 +193,7 @@ extension GSSDK.GSKCameraViewController {
209
193
  }
210
194
  @_hasMissingDesignatedInitializers @objc @_Concurrency.MainActor @preconcurrency open class GSKCameraViewController : UIKit.UIViewController {
211
195
  @_Concurrency.MainActor @preconcurrency public static let photoStabilizationDuration: Foundation.TimeInterval
196
+ @objc @_Concurrency.MainActor @preconcurrency public static func requestCameraAccess() async -> Swift.Bool
212
197
  @_Concurrency.MainActor @preconcurrency final public let configuration: GSSDK.GSKCameraViewController.Configuration
213
198
  @_Concurrency.MainActor @preconcurrency public var cameraView: UIKit.UIView {
214
199
  get
@@ -312,6 +297,10 @@ extension GSSDK.GSKEdgeCleaning : Swift.CustomStringConvertible {
312
297
  @objc get
313
298
  @objc set
314
299
  }
300
+ @objc @_Concurrency.MainActor @preconcurrency public var inset: CoreFoundation.CGFloat {
301
+ @objc get
302
+ @objc set
303
+ }
315
304
  @objc @available(*, deprecated, message: "Deprecated in favor of frameView.imageSelection.insideShadeColor.")
316
305
  @_Concurrency.MainActor @preconcurrency public var shadeColor: UIKit.UIColor {
317
306
  @objc get
@@ -329,6 +318,10 @@ extension GSSDK.GSKEdgeCleaning : Swift.CustomStringConvertible {
329
318
  @objc get
330
319
  @objc set
331
320
  }
321
+ @objc @_Concurrency.MainActor @preconcurrency public var overlayAlpha: CoreFoundation.CGFloat {
322
+ @objc get
323
+ @objc set
324
+ }
332
325
  @objc @_Concurrency.MainActor @preconcurrency public var magnifierViewCenterStyle: GSSDK.GSKMagnifierViewCenterStyle {
333
326
  @objc get
334
327
  @objc set
@@ -494,16 +487,6 @@ extension GSSDK.GSKFilterLightingCorrectionConfiguration {
494
487
  @objc override dynamic public init()
495
488
  @objc deinit
496
489
  }
497
- @_hasMissingDesignatedInitializers final public class GSKLicenseKeyRefresher {
498
- public typealias LicenseKey = Swift.String
499
- #if compiler(>=5.3) && $NonescapableTypes
500
- final public var cachedLicenseKey: GSSDK.GSKLicenseKeyRefresher.LicenseKey? {
501
- get
502
- }
503
- #endif
504
- @objc convenience public init(sdkVersion: Swift.String)
505
- @objc deinit
506
- }
507
490
  extension GSSDK.GSKReadabilityLevel : Swift.Comparable {
508
491
  public static func < (lhs: GSSDK.GSKReadabilityLevel, rhs: GSSDK.GSKReadabilityLevel) -> Swift.Bool
509
492
  }
@@ -567,8 +550,8 @@ extension GSSDK.GSKDocumentGeneratorError : Swift.Error {
567
550
  @objc deinit
568
551
  }
569
552
  @objc public class GSKDocumentGeneratorConfiguration : ObjectiveC.NSObject {
570
- @objc public static func pdfConfiguration(withOutputFilePath outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
571
- @objc public static func tiffConfiguration(withOutputFilePath outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
553
+ @objc(pdfConfigurationWithOutputFilePath:) public static func pdf(outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
554
+ @objc(tiffConfigurationWithOutputFilePath:) public static func tiff(outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
572
555
  @objc final public let outputFileFormat: GSSDK.GSKDocumentGeneratorFileFormat
573
556
  @objc final public let outputFilePath: Swift.String
574
557
  @objc final public let pdfFontFilePath: Swift.String?
@@ -648,15 +631,15 @@ extension GSSDK.GSKDocumentGeneratorError : Swift.Error {
648
631
  #endif
649
632
  @objc deinit
650
633
  }
651
- @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKTextLayoutToTextConverter : ObjectiveC.NSObject {
652
- @objc final public func convert(_ textLayout: GSSDK.GSKTextLayout) throws -> GSSDK.GSKTextLayoutToTextConverterResult
634
+ @objc @_inheritsConvenienceInitializers final public class GSKTextLayoutToTextConverter : ObjectiveC.NSObject {
635
+ final public func convert(_ textLayout: GSSDK.GSKTextLayout) throws -> GSSDK.GSKTextLayoutToTextConverterResult
653
636
  @objc override dynamic public init()
654
637
  @objc deinit
655
638
  }
656
- @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKTextLayoutToTextConverterResult : ObjectiveC.NSObject {
657
- @objc final public let text: Swift.String
658
- @objc final public let averageWordConfidence: Swift.Int
659
- @objc final public let wordCount: Swift.Int
639
+ @objc @_hasMissingDesignatedInitializers final public class GSKTextLayoutToTextConverterResult : ObjectiveC.NSObject {
640
+ final public let text: Swift.String
641
+ final public let averageWordConfidence: Swift.Int
642
+ final public let wordCount: Swift.Int
660
643
  @objc deinit
661
644
  }
662
645
  public enum GSSDKAsset {
@@ -785,14 +768,17 @@ public enum GSSDKStrings {
785
768
  @objc public init(logger: any GSSDK.GSKLogger)
786
769
  @objc override convenience dynamic public init()
787
770
  #if compiler(>=5.3) && $NonescapableTypes
788
- final public func recognizeText(in ocrInput: GSSDK.GSKOCRInput, ocrConfiguration configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
771
+ final public func recognizeText(in ocrInput: GSSDK.GSKOCRInput, configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
789
772
  #endif
790
773
  #if compiler(>=5.3) && $NonescapableTypes
791
- @objc final public func recognizeText(forImageAtPath imagePath: Swift.String, ocrConfiguration configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
774
+ @objc final public func recognizeText(forImageAtPath imagePath: Swift.String, configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
792
775
  #endif
793
776
  @objc deinit
794
777
  }
795
778
  public struct GSKOCRInput {
779
+ public let originalImagePath: Swift.String
780
+ public let quadrangle: GSSDK.GSKQuadrangle?
781
+ public let rotation: GSSDK.GSKRotation
796
782
  #if compiler(>=5.3) && $NonescapableTypes
797
783
  public init(originalImagePath: Swift.String, quadrangle: GSSDK.GSKQuadrangle? = nil, rotation: GSSDK.GSKRotation = .none)
798
784
  #endif
@@ -882,9 +868,19 @@ public enum GSKScanFlowCurvatureCorrectionMode : Swift.String {
882
868
  get
883
869
  }
884
870
  }
885
- @objc public enum GSKScanFlowError : Swift.Int {
886
- @objc(GSKScanFlowUserCancelationError) case userCancellation = 999
887
- @objc(GSKScanFlowBadInputError) case badInput = 1000
871
+ public struct GSKScanFlowError : Swift.Error {
872
+ public var code: GSSDK.GSKScanFlowErrorCode
873
+ public var message: Swift.String
874
+ public var recoveryMessage: Swift.String?
875
+ public var underlyingError: (any Swift.Error)?
876
+ }
877
+ @objc public enum GSKScanFlowErrorCode : Swift.Int {
878
+ @objc(GSKScanFlowCancellationErrorCode) case cancellation = 999
879
+ @objc(GSKScanFlowConfigurationErrorCode) case configuration = 1000
880
+ @objc(GSKScanFlowLicensingErrorCode) case licensing = 1001
881
+ @objc(GSKScanFlowCaptureErrorCode) case capture = 1002
882
+ @objc(GSKScanFlowStorageSpaceErrorCode) case storageSpace = 1003
883
+ @objc(GSKScanFlowInternalErrorCode) case `internal` = 9999
888
884
  #if compiler(>=5.3) && $NonescapableTypes
889
885
  public init?(rawValue: Swift.Int)
890
886
  #endif
@@ -893,6 +889,20 @@ public enum GSKScanFlowCurvatureCorrectionMode : Swift.String {
893
889
  get
894
890
  }
895
891
  }
892
+ @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKScanFlowErrorCodeBridge : ObjectiveC.NSObject {
893
+ @objc public static func stringCode(forRawValue rawValue: Swift.Int) -> Swift.String
894
+ @objc override dynamic public init()
895
+ @objc deinit
896
+ }
897
+ extension GSSDK.GSKScanFlowError : Foundation.CustomNSError {
898
+ public static let errorDomain: Swift.String
899
+ public var errorCode: Swift.Int {
900
+ get
901
+ }
902
+ public var errorUserInfo: [Swift.String : Any] {
903
+ get
904
+ }
905
+ }
896
906
  @objc public enum GSKScanFlowFilterType : Swift.Int, Swift.CaseIterable {
897
907
  @objc(GSKScanFlowFilterNone) case none
898
908
  @objc(GSKScanFlowFilterAutomatic) case automatic
@@ -946,8 +956,8 @@ extension GSSDK.GSKScanFlowFlashMode : Swift.CustomStringConvertible {
946
956
  }
947
957
  @objc public enum GSKScanFlowMultiPageFormat : Swift.UInt {
948
958
  @objc(GSKScanFlowNone) case none
949
- @objc(GSKScanFlowPDF) case PDF
950
- @objc(GSKScanFlowTIFF) case TIFF
959
+ @objc(GSKScanFlowPDF) case pdf
960
+ @objc(GSKScanFlowTIFF) case tiff
951
961
  #if compiler(>=5.3) && $NonescapableTypes
952
962
  public init?(rawValue: Swift.UInt)
953
963
  #endif
@@ -1191,9 +1201,6 @@ public enum GSKBarcodeType : Swift.String, Swift.CaseIterable {
1191
1201
  @objc deinit
1192
1202
  }
1193
1203
  extension GSSDK.GSKBarcodeScanFlow : Swift.Sendable {}
1194
- extension GSSDK.GSKBarcodeScanFlowError : Swift.Equatable {}
1195
- extension GSSDK.GSKBarcodeScanFlowError : Swift.Hashable {}
1196
- extension GSSDK.GSKBarcodeScanFlowError : Swift.RawRepresentable {}
1197
1204
  extension GSSDK.GSKFlashStatus : Swift.Equatable {}
1198
1205
  extension GSSDK.GSKFlashStatus : Swift.Hashable {}
1199
1206
  extension GSSDK.GSKFlashStatus : Swift.RawRepresentable {}
@@ -1229,9 +1236,9 @@ extension GSSDK.GSKScanFlow : Swift.Sendable {}
1229
1236
  extension GSSDK.GSKScanFlowCurvatureCorrectionMode : Swift.Equatable {}
1230
1237
  extension GSSDK.GSKScanFlowCurvatureCorrectionMode : Swift.Hashable {}
1231
1238
  extension GSSDK.GSKScanFlowCurvatureCorrectionMode : Swift.RawRepresentable {}
1232
- extension GSSDK.GSKScanFlowError : Swift.Equatable {}
1233
- extension GSSDK.GSKScanFlowError : Swift.Hashable {}
1234
- extension GSSDK.GSKScanFlowError : Swift.RawRepresentable {}
1239
+ extension GSSDK.GSKScanFlowErrorCode : Swift.Equatable {}
1240
+ extension GSSDK.GSKScanFlowErrorCode : Swift.Hashable {}
1241
+ extension GSSDK.GSKScanFlowErrorCode : Swift.RawRepresentable {}
1235
1242
  extension GSSDK.GSKScanFlowFlashMode : Swift.Equatable {}
1236
1243
  extension GSSDK.GSKScanFlowFlashMode : Swift.Hashable {}
1237
1244
  extension GSSDK.GSKScanFlowFlashMode : Swift.RawRepresentable {}
@@ -1,7 +1,7 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
2
+ // swift-compiler-version: Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
3
3
  // swift-module-flags: -target x86_64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name GSSDK
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
4
+ // swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.3
5
5
  import AVFoundation
6
6
  import Combine
7
7
  import Contacts
@@ -49,22 +49,6 @@ import _SwiftConcurrencyShims
49
49
  @objc override dynamic public init()
50
50
  @objc deinit
51
51
  }
52
- @objc public enum GSKBarcodeScanFlowError : Swift.Int, Swift.Error {
53
- @objc(GSKBarcodeScanFlowUserCancelationError) case userCancellation
54
- @objc(GSKBarcodeScanFlowConfigurationError) case configuration
55
- @objc(GSKBarcodeScanFlowPermissionDeniedError) case permissionDenied
56
- @objc(GSKBarcodeScanFlowDetectorError) case detectorError
57
- #if compiler(>=5.3) && $NonescapableTypes
58
- public init?(rawValue: Swift.Int)
59
- #endif
60
- public typealias RawValue = Swift.Int
61
- public static var _nsErrorDomain: Swift.String {
62
- get
63
- }
64
- public var rawValue: Swift.Int {
65
- get
66
- }
67
- }
68
52
  extension GSSDK.GSKBarcodeScanFlowResult {
69
53
  @objc dynamic public var dictionary: [Swift.String : Any] {
70
54
  @objc get
@@ -209,6 +193,7 @@ extension GSSDK.GSKCameraViewController {
209
193
  }
210
194
  @_hasMissingDesignatedInitializers @objc @_Concurrency.MainActor @preconcurrency open class GSKCameraViewController : UIKit.UIViewController {
211
195
  @_Concurrency.MainActor @preconcurrency public static let photoStabilizationDuration: Foundation.TimeInterval
196
+ @objc @_Concurrency.MainActor @preconcurrency public static func requestCameraAccess() async -> Swift.Bool
212
197
  @_Concurrency.MainActor @preconcurrency final public let configuration: GSSDK.GSKCameraViewController.Configuration
213
198
  @_Concurrency.MainActor @preconcurrency public var cameraView: UIKit.UIView {
214
199
  get
@@ -312,6 +297,10 @@ extension GSSDK.GSKEdgeCleaning : Swift.CustomStringConvertible {
312
297
  @objc get
313
298
  @objc set
314
299
  }
300
+ @objc @_Concurrency.MainActor @preconcurrency public var inset: CoreFoundation.CGFloat {
301
+ @objc get
302
+ @objc set
303
+ }
315
304
  @objc @available(*, deprecated, message: "Deprecated in favor of frameView.imageSelection.insideShadeColor.")
316
305
  @_Concurrency.MainActor @preconcurrency public var shadeColor: UIKit.UIColor {
317
306
  @objc get
@@ -329,6 +318,10 @@ extension GSSDK.GSKEdgeCleaning : Swift.CustomStringConvertible {
329
318
  @objc get
330
319
  @objc set
331
320
  }
321
+ @objc @_Concurrency.MainActor @preconcurrency public var overlayAlpha: CoreFoundation.CGFloat {
322
+ @objc get
323
+ @objc set
324
+ }
332
325
  @objc @_Concurrency.MainActor @preconcurrency public var magnifierViewCenterStyle: GSSDK.GSKMagnifierViewCenterStyle {
333
326
  @objc get
334
327
  @objc set
@@ -494,16 +487,6 @@ extension GSSDK.GSKFilterLightingCorrectionConfiguration {
494
487
  @objc override dynamic public init()
495
488
  @objc deinit
496
489
  }
497
- @_hasMissingDesignatedInitializers final public class GSKLicenseKeyRefresher {
498
- public typealias LicenseKey = Swift.String
499
- #if compiler(>=5.3) && $NonescapableTypes
500
- final public var cachedLicenseKey: GSSDK.GSKLicenseKeyRefresher.LicenseKey? {
501
- get
502
- }
503
- #endif
504
- @objc convenience public init(sdkVersion: Swift.String)
505
- @objc deinit
506
- }
507
490
  extension GSSDK.GSKReadabilityLevel : Swift.Comparable {
508
491
  public static func < (lhs: GSSDK.GSKReadabilityLevel, rhs: GSSDK.GSKReadabilityLevel) -> Swift.Bool
509
492
  }
@@ -567,8 +550,8 @@ extension GSSDK.GSKDocumentGeneratorError : Swift.Error {
567
550
  @objc deinit
568
551
  }
569
552
  @objc public class GSKDocumentGeneratorConfiguration : ObjectiveC.NSObject {
570
- @objc public static func pdfConfiguration(withOutputFilePath outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
571
- @objc public static func tiffConfiguration(withOutputFilePath outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
553
+ @objc(pdfConfigurationWithOutputFilePath:) public static func pdf(outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
554
+ @objc(tiffConfigurationWithOutputFilePath:) public static func tiff(outputFilePath: Swift.String) -> GSSDK.GSKDocumentGeneratorConfiguration
572
555
  @objc final public let outputFileFormat: GSSDK.GSKDocumentGeneratorFileFormat
573
556
  @objc final public let outputFilePath: Swift.String
574
557
  @objc final public let pdfFontFilePath: Swift.String?
@@ -648,15 +631,15 @@ extension GSSDK.GSKDocumentGeneratorError : Swift.Error {
648
631
  #endif
649
632
  @objc deinit
650
633
  }
651
- @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKTextLayoutToTextConverter : ObjectiveC.NSObject {
652
- @objc final public func convert(_ textLayout: GSSDK.GSKTextLayout) throws -> GSSDK.GSKTextLayoutToTextConverterResult
634
+ @objc @_inheritsConvenienceInitializers final public class GSKTextLayoutToTextConverter : ObjectiveC.NSObject {
635
+ final public func convert(_ textLayout: GSSDK.GSKTextLayout) throws -> GSSDK.GSKTextLayoutToTextConverterResult
653
636
  @objc override dynamic public init()
654
637
  @objc deinit
655
638
  }
656
- @objc @_hasMissingDesignatedInitializers @objcMembers final public class GSKTextLayoutToTextConverterResult : ObjectiveC.NSObject {
657
- @objc final public let text: Swift.String
658
- @objc final public let averageWordConfidence: Swift.Int
659
- @objc final public let wordCount: Swift.Int
639
+ @objc @_hasMissingDesignatedInitializers final public class GSKTextLayoutToTextConverterResult : ObjectiveC.NSObject {
640
+ final public let text: Swift.String
641
+ final public let averageWordConfidence: Swift.Int
642
+ final public let wordCount: Swift.Int
660
643
  @objc deinit
661
644
  }
662
645
  public enum GSSDKAsset {
@@ -785,14 +768,17 @@ public enum GSSDKStrings {
785
768
  @objc public init(logger: any GSSDK.GSKLogger)
786
769
  @objc override convenience dynamic public init()
787
770
  #if compiler(>=5.3) && $NonescapableTypes
788
- final public func recognizeText(in ocrInput: GSSDK.GSKOCRInput, ocrConfiguration configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
771
+ final public func recognizeText(in ocrInput: GSSDK.GSKOCRInput, configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
789
772
  #endif
790
773
  #if compiler(>=5.3) && $NonescapableTypes
791
- @objc final public func recognizeText(forImageAtPath imagePath: Swift.String, ocrConfiguration configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
774
+ @objc final public func recognizeText(forImageAtPath imagePath: Swift.String, configuration: GSSDK.GSKOCRConfiguration, onProgress progressBlock: ((Swift.Float) -> Swift.Void)?) async throws -> GSSDK.GSKOCRResult
792
775
  #endif
793
776
  @objc deinit
794
777
  }
795
778
  public struct GSKOCRInput {
779
+ public let originalImagePath: Swift.String
780
+ public let quadrangle: GSSDK.GSKQuadrangle?
781
+ public let rotation: GSSDK.GSKRotation
796
782
  #if compiler(>=5.3) && $NonescapableTypes
797
783
  public init(originalImagePath: Swift.String, quadrangle: GSSDK.GSKQuadrangle? = nil, rotation: GSSDK.GSKRotation = .none)
798
784
  #endif
@@ -882,9 +868,19 @@ public enum GSKScanFlowCurvatureCorrectionMode : Swift.String {
882
868
  get
883
869
  }
884
870
  }
885
- @objc public enum GSKScanFlowError : Swift.Int {
886
- @objc(GSKScanFlowUserCancelationError) case userCancellation = 999
887
- @objc(GSKScanFlowBadInputError) case badInput = 1000
871
+ public struct GSKScanFlowError : Swift.Error {
872
+ public var code: GSSDK.GSKScanFlowErrorCode
873
+ public var message: Swift.String
874
+ public var recoveryMessage: Swift.String?
875
+ public var underlyingError: (any Swift.Error)?
876
+ }
877
+ @objc public enum GSKScanFlowErrorCode : Swift.Int {
878
+ @objc(GSKScanFlowCancellationErrorCode) case cancellation = 999
879
+ @objc(GSKScanFlowConfigurationErrorCode) case configuration = 1000
880
+ @objc(GSKScanFlowLicensingErrorCode) case licensing = 1001
881
+ @objc(GSKScanFlowCaptureErrorCode) case capture = 1002
882
+ @objc(GSKScanFlowStorageSpaceErrorCode) case storageSpace = 1003
883
+ @objc(GSKScanFlowInternalErrorCode) case `internal` = 9999
888
884
  #if compiler(>=5.3) && $NonescapableTypes
889
885
  public init?(rawValue: Swift.Int)
890
886
  #endif
@@ -893,6 +889,20 @@ public enum GSKScanFlowCurvatureCorrectionMode : Swift.String {
893
889
  get
894
890
  }
895
891
  }
892
+ @objc @_inheritsConvenienceInitializers @objcMembers final public class GSKScanFlowErrorCodeBridge : ObjectiveC.NSObject {
893
+ @objc public static func stringCode(forRawValue rawValue: Swift.Int) -> Swift.String
894
+ @objc override dynamic public init()
895
+ @objc deinit
896
+ }
897
+ extension GSSDK.GSKScanFlowError : Foundation.CustomNSError {
898
+ public static let errorDomain: Swift.String
899
+ public var errorCode: Swift.Int {
900
+ get
901
+ }
902
+ public var errorUserInfo: [Swift.String : Any] {
903
+ get
904
+ }
905
+ }
896
906
  @objc public enum GSKScanFlowFilterType : Swift.Int, Swift.CaseIterable {
897
907
  @objc(GSKScanFlowFilterNone) case none
898
908
  @objc(GSKScanFlowFilterAutomatic) case automatic
@@ -946,8 +956,8 @@ extension GSSDK.GSKScanFlowFlashMode : Swift.CustomStringConvertible {
946
956
  }
947
957
  @objc public enum GSKScanFlowMultiPageFormat : Swift.UInt {
948
958
  @objc(GSKScanFlowNone) case none
949
- @objc(GSKScanFlowPDF) case PDF
950
- @objc(GSKScanFlowTIFF) case TIFF
959
+ @objc(GSKScanFlowPDF) case pdf
960
+ @objc(GSKScanFlowTIFF) case tiff
951
961
  #if compiler(>=5.3) && $NonescapableTypes
952
962
  public init?(rawValue: Swift.UInt)
953
963
  #endif
@@ -1191,9 +1201,6 @@ public enum GSKBarcodeType : Swift.String, Swift.CaseIterable {
1191
1201
  @objc deinit
1192
1202
  }
1193
1203
  extension GSSDK.GSKBarcodeScanFlow : Swift.Sendable {}
1194
- extension GSSDK.GSKBarcodeScanFlowError : Swift.Equatable {}
1195
- extension GSSDK.GSKBarcodeScanFlowError : Swift.Hashable {}
1196
- extension GSSDK.GSKBarcodeScanFlowError : Swift.RawRepresentable {}
1197
1204
  extension GSSDK.GSKFlashStatus : Swift.Equatable {}
1198
1205
  extension GSSDK.GSKFlashStatus : Swift.Hashable {}
1199
1206
  extension GSSDK.GSKFlashStatus : Swift.RawRepresentable {}
@@ -1229,9 +1236,9 @@ extension GSSDK.GSKScanFlow : Swift.Sendable {}
1229
1236
  extension GSSDK.GSKScanFlowCurvatureCorrectionMode : Swift.Equatable {}
1230
1237
  extension GSSDK.GSKScanFlowCurvatureCorrectionMode : Swift.Hashable {}
1231
1238
  extension GSSDK.GSKScanFlowCurvatureCorrectionMode : Swift.RawRepresentable {}
1232
- extension GSSDK.GSKScanFlowError : Swift.Equatable {}
1233
- extension GSSDK.GSKScanFlowError : Swift.Hashable {}
1234
- extension GSSDK.GSKScanFlowError : Swift.RawRepresentable {}
1239
+ extension GSSDK.GSKScanFlowErrorCode : Swift.Equatable {}
1240
+ extension GSSDK.GSKScanFlowErrorCode : Swift.Hashable {}
1241
+ extension GSSDK.GSKScanFlowErrorCode : Swift.RawRepresentable {}
1235
1242
  extension GSSDK.GSKScanFlowFlashMode : Swift.Equatable {}
1236
1243
  extension GSSDK.GSKScanFlowFlashMode : Swift.Hashable {}
1237
1244
  extension GSSDK.GSKScanFlowFlashMode : Swift.RawRepresentable {}
@@ -10,6 +10,7 @@
10
10
  @property (nonatomic, strong) GSKScanFlow *scanner;
11
11
  @property (nonatomic, strong) GSKBarcodeScanFlow *barcodeScanner;
12
12
  - (void)presentViewController:(UIViewController *)viewController rejecter:(RCTPromiseRejectBlock)reject;
13
+ - (void)rejectWithError:(NSError *)error rejecter:(RCTPromiseRejectBlock)reject;
13
14
  @end
14
15
 
15
16
  @implementation RNGeniusScan
@@ -31,6 +32,19 @@
31
32
  });
32
33
  }
33
34
 
35
+ - (NSError *)fallbackInternalErrorWithMessage:(NSString *)message {
36
+ return [NSError errorWithDomain:GSKScanFlowErrorDomain
37
+ code:GSKScanFlowInternalErrorCode
38
+ userInfo:@{ NSLocalizedDescriptionKey: message ?: @"" }];
39
+ }
40
+
41
+ - (void)rejectWithError:(NSError *)error rejecter:(RCTPromiseRejectBlock)reject {
42
+ NSDictionary<NSString *, NSString *> *payload = [GSKScanFlowErrorPayload payloadFromNSError:error];
43
+ NSMutableDictionary<NSString *, id> *userInfo = [payload mutableCopy];
44
+ NSError *wrappedError = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo];
45
+ reject(payload[@"code"], payload[@"message"], wrappedError);
46
+ }
47
+
34
48
  RCT_EXPORT_MODULE();
35
49
 
36
50
  RCT_EXPORT_METHOD(setLicenseKey:(NSString *)licenseKey autoRefresh:(BOOL)autoRefresh resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
@@ -46,7 +60,7 @@ RCT_EXPORT_METHOD(scanWithConfiguration:(NSDictionary *)scanOptions
46
60
  NSError *error = nil;
47
61
  GSKScanFlowConfiguration *configuration = [GSKScanFlowConfiguration configurationWithDictionary:scanOptions error:&error];
48
62
  if (!configuration) {
49
- reject([NSString stringWithFormat:@"%@ error %d", error.domain, error.code], error.localizedDescription, error);
63
+ [self rejectWithError:error rejecter:reject];
50
64
  return;
51
65
  }
52
66
 
@@ -58,7 +72,7 @@ RCT_EXPORT_METHOD(scanWithConfiguration:(NSDictionary *)scanOptions
58
72
  [self.scanner startFromViewController:root onSuccess:^(GSKScanFlowResult * _Nonnull result) {
59
73
  resolve([result dictionary]);
60
74
  } failure:^(NSError *error) {
61
- reject([NSString stringWithFormat:@"%@ error %d", error.domain, error.code], error.localizedDescription, error);
75
+ [self rejectWithError:error rejecter:reject];
62
76
  }];
63
77
  }
64
78
  @catch (NSException *exception) {
@@ -75,13 +89,13 @@ RCT_EXPORT_METHOD(generateDocument:(NSDictionary *)documentDictionary
75
89
  NSError *error = nil;
76
90
  GSKDocumentGeneratorConfiguration *configuration = [[GSKDocumentGeneratorConfiguration alloc] initWithDictionary:configurationDictionary error:&error];
77
91
  if (!configuration) {
78
- reject([NSString stringWithFormat:@"%@ error %d", error.domain, error.code], error.localizedDescription, error);
92
+ [self rejectWithError:error rejecter:reject];
79
93
  return;
80
94
  }
81
95
 
82
96
  GSKPDFDocument *document = [[GSKPDFDocument alloc] initWithDictionary:documentDictionary error:&error];
83
97
  if (!document) {
84
- reject([NSString stringWithFormat:@"%@ error %d", error.domain, error.code], error.localizedDescription, error);
98
+ [self rejectWithError:error rejecter:reject];
85
99
  return;
86
100
  }
87
101
 
@@ -89,7 +103,8 @@ RCT_EXPORT_METHOD(generateDocument:(NSDictionary *)documentDictionary
89
103
  if (success) {
90
104
  resolve(nil);
91
105
  } else {
92
- reject([NSString stringWithFormat:@"%@ error %d", error.domain, error.code], @"Document generation failed.", error);
106
+ NSError *finalError = error ?: [self fallbackInternalErrorWithMessage:@"Document generation failed."];
107
+ [self rejectWithError:finalError rejecter:reject];
93
108
  }
94
109
  }
95
110
 
@@ -100,7 +115,7 @@ RCT_EXPORT_METHOD(scanBarcodesWithConfiguration:(NSDictionary *)configuration
100
115
  NSError *error = nil;
101
116
  GSKBarcodeScanFlowConfiguration *barcodeConfiguration = [GSKBarcodeScanFlowConfiguration configurationWithDictionary:configuration error:&error];
102
117
  if (!barcodeConfiguration) {
103
- reject([NSString stringWithFormat:@"%@ error %ld", error.domain, (long)error.code], error.localizedDescription, error);
118
+ [self rejectWithError:error rejecter:reject];
104
119
  return;
105
120
  }
106
121
 
@@ -112,7 +127,7 @@ RCT_EXPORT_METHOD(scanBarcodesWithConfiguration:(NSDictionary *)configuration
112
127
  [self.barcodeScanner startFromViewController:root success:^(GSKBarcodeScanFlowResult * _Nonnull result) {
113
128
  resolve([result dictionary]);
114
129
  } failure:^(NSError * _Nonnull error) {
115
- reject([NSString stringWithFormat:@"%@ error %ld", error.domain, (long)error.code], error.localizedDescription, error);
130
+ [self rejectWithError:error rejecter:reject];
116
131
  }];
117
132
  }
118
133
  @catch (NSException *exception) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegrizzlylabs/react-native-genius-scan",
3
- "version": "6.0.0-beta01",
3
+ "version": "6.0.0-beta03",
4
4
  "description": "React Native Plugin for Genius Scan SDK",
5
5
  "author": "TheGrizzlyLabs <sdk@thegrizzlylabs.com> (https://www.thegrizzlylabs.com/)",
6
6
  "homepage": "https://geniusscansdk.com",
@@ -1,67 +0,0 @@
1
- //
2
- // Genius Scan SDK
3
- //
4
- // Copyright 2010-2019 The Grizzly Labs
5
- //
6
- // Subject to the Genius Scan SDK Licensing Agreement
7
- // sdk@thegrizzlylabs.com
8
- //
9
-
10
- #import <UIKit/UIKit.h>
11
-
12
- @class GSKEditableFrame;
13
- @class GSKQuadrangle;
14
-
15
- NS_ASSUME_NONNULL_BEGIN
16
-
17
- extern const CGFloat GSKEditableFrameDefaultHandleWidth;
18
-
19
- /**
20
- Represents the quadrangle in the quadrangle edition screen.
21
- */
22
- @protocol GSKEditableFrameDelegate
23
-
24
- - (void)editableFrameDidChange:(GSKEditableFrame *)frame;
25
- - (CGRect)editableFrameBoundsForFrameCorners:(GSKEditableFrame *)editableFrame ;
26
- - (void)editableFrame:(GSKEditableFrame *)editableFrame userDidTouchPoint:(CGPoint)currentTouchPosition;
27
- - (void)editableFrame:(GSKEditableFrame *)editableFrame userDidSelectCorner:(CGPoint)cornerPosition withFingerLocation:(CGPoint)pt;
28
- - (void)editableFrameUserDidEndSelectCorner:(GSKEditableFrame *)editableFrame;
29
- - (void)editableFrameUserDidDoubleTap:(GSKEditableFrame *)editableFrame;
30
- @end
31
-
32
- @interface GSKEditableFrame : UIView
33
-
34
- @property (nonatomic, strong) GSKQuadrangle *quadrangle;
35
-
36
- @property (nonatomic, weak, nullable) id <GSKEditableFrameDelegate> delegate;
37
-
38
- /**
39
- The color of the area outside of the quadrangle.
40
- */
41
- @property (nonatomic, copy) UIColor *outsideShadeColor;
42
-
43
- /**
44
- The color of the area inside of the quadrangle.
45
- */
46
- @property (nonatomic, copy) UIColor *insideShadeColor;
47
-
48
- /**
49
- The color of the area inside of the quadrangle.
50
- */
51
- @property (nonatomic, copy) UIColor *shadeColor DEPRECATED_MSG_ATTRIBUTE("Deprecated in favor of `insideShadeColor`.");
52
-
53
- /**
54
- The color of the edges and grid lines.
55
- */
56
- @property (nonatomic, copy) UIColor *lineColor;
57
-
58
- /**
59
- The width of the handle that signify that corners can be dragged.
60
-
61
- Default: 5
62
- */
63
- @property (nonatomic, assign) CGFloat handleWidth;
64
-
65
- @end
66
-
67
- NS_ASSUME_NONNULL_END