@thegrizzlylabs/react-native-genius-scan 5.0.0-beta1 → 5.0.0-beta2

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 (36) hide show
  1. package/android/build.gradle +1 -1
  2. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  3. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterType.h +1 -1
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowErrorDomain.h +7 -0
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowOCROutputFormats.h +22 -0
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowPostProcessingActions.h +22 -0
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +13 -0
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +43 -135
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +5 -1
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/MBProgressHUD.h +411 -0
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +7820 -10200
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +45 -117
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +45 -117
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterType.h +1 -1
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowErrorDomain.h +7 -0
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowOCROutputFormats.h +22 -0
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowPostProcessingActions.h +22 -0
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +13 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +86 -270
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +5 -1
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/MBProgressHUD.h +411 -0
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +7820 -10200
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +45 -117
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +45 -117
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +7820 -10200
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +45 -117
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +45 -117
  34. package/package.json +1 -1
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlow.h +0 -91
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlow.h +0 -91
@@ -277,7 +277,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
277
277
  #if __has_warning("-Watimport-in-framework-header")
278
278
  #pragma clang diagnostic ignored "-Watimport-in-framework-header"
279
279
  #endif
280
- @import CoreFoundation;
281
280
  @import Dispatch;
282
281
  @import Foundation;
283
282
  @import ObjectiveC;
@@ -304,17 +303,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
304
303
  #endif
305
304
 
306
305
  #if defined(__OBJC__)
307
- @class NSCoder;
308
- @class UIImage;
309
-
310
- SWIFT_CLASS("_TtC5GSSDK33BVImageContentViewObjCWrapperView")
311
- @interface BVImageContentViewObjCWrapperView : UIView
312
- - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
313
- - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
314
- - (void)setImage:(UIImage * _Nonnull)image;
315
- - (void)setZoomLimits;
316
- @end
317
-
318
306
 
319
307
 
320
308
 
@@ -523,6 +511,39 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
523
511
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
524
512
  @end
525
513
 
514
+ @class GSKScanFlowConfiguration;
515
+ @class UIViewController;
516
+ @class GSKScanFlowResult;
517
+
518
+ /// A high-level scanner module.
519
+ /// You present it and when the user is done, you obtain a result object containing the scanned documents.
520
+ /// The scan flow can be customized with a <code>GSKScanFlowConfiguration</code> instance.
521
+ SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
522
+ @interface GSKScanFlow : NSObject
523
+ - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
524
+ /// Present the scan flow. Asynchronously returns a <code>GSKScanFlowResult</code> object, which
525
+ /// gives you access to the scanned documents, or throws any error that was encountered.
526
+ /// @param viewController The view controller to present the scan flow from.
527
+ - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
528
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
529
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
530
+ @end
531
+
532
+
533
+ @interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
534
+ /// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
535
+ /// This initializer is only available from Objective-C.
536
+ + (nonnull instancetype)scanFlowWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
537
+ /// Present the scan flow.
538
+ /// @param viewController The view controller to present the scan flow from.
539
+ /// @param completionBlock A completion block/closure that will be called on the main
540
+ /// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
541
+ /// a parameter. This object gives you access to the scanned documents.
542
+ /// @param errorBlock A block/closure called if an error was encountered.
543
+ - (void)startFrom:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
544
+ @end
545
+
546
+
526
547
  enum GSKScanFlowSource : NSUInteger;
527
548
  @class NSURL;
528
549
  enum GSKScanFlowFilterType : NSInteger;
@@ -598,6 +619,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
598
619
  @end
599
620
 
600
621
 
622
+
601
623
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
602
624
  /// Create a configuration from a dictionary.
603
625
  /// This is particularly useful for interfacing with React Native but shouldn’t
@@ -606,6 +628,10 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
606
628
  @end
607
629
 
608
630
 
631
+ @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
632
+ - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
633
+ @end
634
+
609
635
 
610
636
  /// Enum that defines various errors that can occur during a scan flow.
611
637
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
@@ -659,6 +685,7 @@ SWIFT_CLASS("_TtC5GSSDK27GSKScanFlowOCRConfiguration")
659
685
 
660
686
 
661
687
 
688
+
662
689
  /// The result of the text recognition.
663
690
  SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
664
691
  @interface GSKScanFlowOCRResult : NSObject
@@ -669,6 +696,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
669
696
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
670
697
  @end
671
698
 
699
+
672
700
  /// The generated PDF paper size.
673
701
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
674
702
  /// PDF page with a width of 8.27 inch (A4 width) and fitting height.
@@ -726,45 +754,6 @@ SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
726
754
  @end
727
755
 
728
756
 
729
- @class GSKQuadrangle;
730
-
731
- /// The output result from a scan flow.
732
- SWIFT_CLASS("_TtC5GSSDK23GSKScanFlowScanInternal")
733
- @interface GSKScanFlowScanInternal : NSObject
734
- /// The original JPEG out of the camera.
735
- /// Note that this image might be rotated, and needs to be read with
736
- /// its EXIF orientation to be properly displayed. <code>UIImage</code> will
737
- /// properly take care of that.
738
- @property (nonatomic, readonly, copy) NSString * _Nonnull originalFilePath;
739
- /// The enhanced, processed, image.
740
- @property (nonatomic, copy) NSString * _Nonnull enhancedFilePath;
741
- /// The quadrangle that was applied during the scan flow.
742
- @property (nonatomic, strong) GSKQuadrangle * _Nonnull appliedQuadrangle;
743
- /// The filter that was applied during the scan flow.
744
- @property (nonatomic) GSKFilterType appliedFilter;
745
- /// The rotation that was applied during the scan flow.
746
- @property (nonatomic) GSKRotation appliedRotation;
747
- /// If OCR was performed, the recognized text.
748
- @property (nonatomic, strong) GSKOCRResult * _Nullable ocrResult;
749
- /// If bank details extraction was performed and successful, the
750
- /// extracted IBAN, otherwise <code>nil</code>.
751
- @property (nonatomic, copy) NSString * _Nullable structuredDataIBAN;
752
- /// If bank details extraction was performed and successful, the
753
- /// extracted BIC, otherwise <code>nil</code>.
754
- @property (nonatomic, copy) NSString * _Nullable structuredDataBIC;
755
- - (nonnull instancetype)initWithOriginalFilePath:(NSString * _Nonnull)originalFilePath enhancedFilePath:(NSString * _Nonnull)enhancedFilePath appliedQuadrangle:(GSKQuadrangle * _Nonnull)appliedQuadrangle appliedFilter:(GSKFilterType)appliedFilter appliedRotation:(GSKRotation)appliedRotation logger:(id <GSKLogger> _Nonnull)logger OBJC_DESIGNATED_INITIALIZER;
756
- /// Convenient way to access the original image as an <code>UIImage</code>
757
- - (UIImage * _Nullable)originalImage SWIFT_WARN_UNUSED_RESULT;
758
- /// Convenient way to access the processed image as an <code>UIImage</code>
759
- - (UIImage * _Nullable)enhancedImage SWIFT_WARN_UNUSED_RESULT;
760
- /// Deletes all the files related to this scan. Convenient to clean
761
- /// up after you copied what you needed.
762
- - (void)delete;
763
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
764
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
765
- @end
766
-
767
-
768
757
  /// The source for a scan flow
769
758
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
770
759
  /// Scan using the camera
@@ -797,24 +786,6 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
797
786
  @end
798
787
 
799
788
 
800
- SWIFT_CLASS("_TtC5GSSDK21GSKSerialQueueService")
801
- @interface GSKSerialQueueService : NSObject
802
- - (void)waitForCompletion:(void (^ _Nonnull)(void))onDone;
803
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
804
- @end
805
-
806
-
807
- SWIFT_CLASS("_TtC5GSSDK32GSKScanFlowStructuredDataService")
808
- @interface GSKScanFlowStructuredDataService : GSKSerialQueueService
809
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKScanFlowStructuredDataService * _Nonnull shared;)
810
- + (GSKScanFlowStructuredDataService * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
811
- - (void)process:(GSKScanFlowScanInternal * _Nonnull)scan configuration:(GSKScanFlowConfiguration * _Nonnull)configuration;
812
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
813
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
814
- @end
815
-
816
-
817
-
818
789
  SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
819
790
  @interface GSKTextLayout : NSObject
820
791
  @property (nonatomic, readonly, copy) NSString * _Nullable hocr;
@@ -832,72 +803,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
832
803
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
833
804
  @end
834
805
 
835
- @protocol GSKUICameraViewControllerDelegate;
836
- @class UIButton;
837
- @class GSKCameraSession;
838
- @class GSKScan;
839
-
840
- /// View controller that manages the camera UI presented by <code>GSKScanFlow</code>.
841
- SWIFT_CLASS("_TtC5GSSDK25GSKUICameraViewController")
842
- @interface GSKUICameraViewController : GSKCameraViewController
843
- @property (nonatomic, readonly) UIInterfaceOrientationMask supportedInterfaceOrientations;
844
- @property (nonatomic, weak) id <GSKUICameraViewControllerDelegate> _Nullable delegate;
845
- @property (nonatomic, readonly, strong) UIButton * _Nonnull doneButton;
846
- - (nonnull instancetype)initWithSession:(GSKCameraSession * _Nonnull)session configuration:(GSKScanFlowConfiguration * _Nonnull)configuration logger:(id <GSKLogger> _Nonnull)logger OBJC_DESIGNATED_INITIALIZER;
847
- - (void)viewDidLoad;
848
- - (void)viewWillAppear:(BOOL)animated;
849
- - (void)cameraSessionDidSetup:(GSKCameraSession * _Nonnull)cameraSession;
850
- - (void)cameraSessionWillSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
851
- - (void)cameraSessionDidSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
852
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didGenerateScan:(GSKScan * _Nonnull)scan;
853
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFailWithError:(NSError * _Nonnull)error;
854
- - (void)cameraSessionIsSearchingQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
855
- - (void)cameraSessionFailedToFindQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
856
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFindQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
857
- - (void)cameraSessionIsAboutToChooseQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
858
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession willAutoTriggerWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
859
- - (null_unspecified instancetype)initWithCameraSession:(GSKCameraSession * _Null_unspecified)cameraSession SWIFT_UNAVAILABLE;
860
- @end
861
-
862
-
863
-
864
- /// Delegate protocol for <code>GSKUICameraViewController</code>.
865
- SWIFT_PROTOCOL("_TtP5GSSDK33GSKUICameraViewControllerDelegate_")
866
- @protocol GSKUICameraViewControllerDelegate
867
- - (void)cameraViewControllerDidCancel:(GSKUICameraViewController * _Nonnull)viewController;
868
- - (void)cameraViewControllerDone:(GSKUICameraViewController * _Nonnull)viewController;
869
- - (void)cameraViewControllerDidSnapPhoto:(GSKUICameraViewController * _Nonnull)viewController;
870
- - (void)cameraViewController:(GSKUICameraViewController * _Nonnull)viewController didScan:(GSKScan * _Nonnull)scan onComplete:(void (^ _Nonnull)(void))onComplete;
871
- - (void)cameraViewController:(GSKUICameraViewController * _Nonnull)viewController didFailWithError:(NSError * _Nonnull)error;
872
- @end
873
-
874
-
875
- /// Document generator that can create file representations of
876
- /// scans using any format defined by <code>GSKScanFlowMultiPageFormat</code>.
877
- SWIFT_CLASS("_TtC5GSSDK22GSKUIDocumentGenerator")
878
- @interface GSKUIDocumentGenerator : NSObject
879
- /// Initialize an instance with a given multi-page document format.
880
- /// Returns <code>nil</code> if the <code>none</code> multi-page format was passed.
881
- - (nullable instancetype)initWithMultiPageFormat:(enum GSKScanFlowMultiPageFormat)multiPageFormat;
882
- /// Generate a file representation for a document derived from
883
- /// an array of scans. Returns a <code>URL</code> that points to the generated
884
- /// document, or <code>nil</code> if the document generation failed.
885
- - (NSURL * _Nullable)generateDocumentFromScans:(NSArray<GSKScanFlowScanInternal *> * _Nonnull)scans withConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
886
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
887
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
888
- @end
889
-
890
-
891
-
892
- SWIFT_CLASS("_TtC5GSSDK15GSKUIOCRService")
893
- @interface GSKUIOCRService : GSKSerialQueueService
894
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIOCRService * _Nonnull shared;)
895
- + (GSKUIOCRService * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
896
- @property (nonatomic, readonly) NSInteger pendingCount;
897
- - (void)process:(GSKScanFlowScanInternal * _Nonnull)scan configuration:(GSKScanFlowOCRConfiguration * _Nonnull)configuration;
898
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
899
- @end
900
-
901
806
 
902
807
 
903
808
  @interface GSKView (SWIFT_EXTENSION(GSSDK))
@@ -920,6 +825,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
920
825
 
921
826
 
922
827
 
828
+
829
+
830
+
923
831
  @interface UIViewController (SWIFT_EXTENSION(GSSDK))
924
832
  /// Return a status bar style appropriate for this view controller
925
833
  /// based on the contrast between the status bar’s contents and the
@@ -1218,7 +1126,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
1218
1126
  #if __has_warning("-Watimport-in-framework-header")
1219
1127
  #pragma clang diagnostic ignored "-Watimport-in-framework-header"
1220
1128
  #endif
1221
- @import CoreFoundation;
1222
1129
  @import Dispatch;
1223
1130
  @import Foundation;
1224
1131
  @import ObjectiveC;
@@ -1245,17 +1152,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
1245
1152
  #endif
1246
1153
 
1247
1154
  #if defined(__OBJC__)
1248
- @class NSCoder;
1249
- @class UIImage;
1250
-
1251
- SWIFT_CLASS("_TtC5GSSDK33BVImageContentViewObjCWrapperView")
1252
- @interface BVImageContentViewObjCWrapperView : UIView
1253
- - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
1254
- - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
1255
- - (void)setImage:(UIImage * _Nonnull)image;
1256
- - (void)setZoomLimits;
1257
- @end
1258
-
1259
1155
 
1260
1156
 
1261
1157
 
@@ -1464,6 +1360,39 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
1464
1360
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1465
1361
  @end
1466
1362
 
1363
+ @class GSKScanFlowConfiguration;
1364
+ @class UIViewController;
1365
+ @class GSKScanFlowResult;
1366
+
1367
+ /// A high-level scanner module.
1368
+ /// You present it and when the user is done, you obtain a result object containing the scanned documents.
1369
+ /// The scan flow can be customized with a <code>GSKScanFlowConfiguration</code> instance.
1370
+ SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
1371
+ @interface GSKScanFlow : NSObject
1372
+ - (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
1373
+ /// Present the scan flow. Asynchronously returns a <code>GSKScanFlowResult</code> object, which
1374
+ /// gives you access to the scanned documents, or throws any error that was encountered.
1375
+ /// @param viewController The view controller to present the scan flow from.
1376
+ - (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
1377
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1378
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1379
+ @end
1380
+
1381
+
1382
+ @interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
1383
+ /// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
1384
+ /// This initializer is only available from Objective-C.
1385
+ + (nonnull instancetype)scanFlowWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
1386
+ /// Present the scan flow.
1387
+ /// @param viewController The view controller to present the scan flow from.
1388
+ /// @param completionBlock A completion block/closure that will be called on the main
1389
+ /// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
1390
+ /// a parameter. This object gives you access to the scanned documents.
1391
+ /// @param errorBlock A block/closure called if an error was encountered.
1392
+ - (void)startFrom:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
1393
+ @end
1394
+
1395
+
1467
1396
  enum GSKScanFlowSource : NSUInteger;
1468
1397
  @class NSURL;
1469
1398
  enum GSKScanFlowFilterType : NSInteger;
@@ -1539,6 +1468,7 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1539
1468
  @end
1540
1469
 
1541
1470
 
1471
+
1542
1472
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1543
1473
  /// Create a configuration from a dictionary.
1544
1474
  /// This is particularly useful for interfacing with React Native but shouldn’t
@@ -1547,6 +1477,10 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
1547
1477
  @end
1548
1478
 
1549
1479
 
1480
+ @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
1481
+ - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
1482
+ @end
1483
+
1550
1484
 
1551
1485
  /// Enum that defines various errors that can occur during a scan flow.
1552
1486
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
@@ -1600,6 +1534,7 @@ SWIFT_CLASS("_TtC5GSSDK27GSKScanFlowOCRConfiguration")
1600
1534
 
1601
1535
 
1602
1536
 
1537
+
1603
1538
  /// The result of the text recognition.
1604
1539
  SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
1605
1540
  @interface GSKScanFlowOCRResult : NSObject
@@ -1610,6 +1545,7 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
1610
1545
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1611
1546
  @end
1612
1547
 
1548
+
1613
1549
  /// The generated PDF paper size.
1614
1550
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
1615
1551
  /// PDF page with a width of 8.27 inch (A4 width) and fitting height.
@@ -1667,45 +1603,6 @@ SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
1667
1603
  @end
1668
1604
 
1669
1605
 
1670
- @class GSKQuadrangle;
1671
-
1672
- /// The output result from a scan flow.
1673
- SWIFT_CLASS("_TtC5GSSDK23GSKScanFlowScanInternal")
1674
- @interface GSKScanFlowScanInternal : NSObject
1675
- /// The original JPEG out of the camera.
1676
- /// Note that this image might be rotated, and needs to be read with
1677
- /// its EXIF orientation to be properly displayed. <code>UIImage</code> will
1678
- /// properly take care of that.
1679
- @property (nonatomic, readonly, copy) NSString * _Nonnull originalFilePath;
1680
- /// The enhanced, processed, image.
1681
- @property (nonatomic, copy) NSString * _Nonnull enhancedFilePath;
1682
- /// The quadrangle that was applied during the scan flow.
1683
- @property (nonatomic, strong) GSKQuadrangle * _Nonnull appliedQuadrangle;
1684
- /// The filter that was applied during the scan flow.
1685
- @property (nonatomic) GSKFilterType appliedFilter;
1686
- /// The rotation that was applied during the scan flow.
1687
- @property (nonatomic) GSKRotation appliedRotation;
1688
- /// If OCR was performed, the recognized text.
1689
- @property (nonatomic, strong) GSKOCRResult * _Nullable ocrResult;
1690
- /// If bank details extraction was performed and successful, the
1691
- /// extracted IBAN, otherwise <code>nil</code>.
1692
- @property (nonatomic, copy) NSString * _Nullable structuredDataIBAN;
1693
- /// If bank details extraction was performed and successful, the
1694
- /// extracted BIC, otherwise <code>nil</code>.
1695
- @property (nonatomic, copy) NSString * _Nullable structuredDataBIC;
1696
- - (nonnull instancetype)initWithOriginalFilePath:(NSString * _Nonnull)originalFilePath enhancedFilePath:(NSString * _Nonnull)enhancedFilePath appliedQuadrangle:(GSKQuadrangle * _Nonnull)appliedQuadrangle appliedFilter:(GSKFilterType)appliedFilter appliedRotation:(GSKRotation)appliedRotation logger:(id <GSKLogger> _Nonnull)logger OBJC_DESIGNATED_INITIALIZER;
1697
- /// Convenient way to access the original image as an <code>UIImage</code>
1698
- - (UIImage * _Nullable)originalImage SWIFT_WARN_UNUSED_RESULT;
1699
- /// Convenient way to access the processed image as an <code>UIImage</code>
1700
- - (UIImage * _Nullable)enhancedImage SWIFT_WARN_UNUSED_RESULT;
1701
- /// Deletes all the files related to this scan. Convenient to clean
1702
- /// up after you copied what you needed.
1703
- - (void)delete;
1704
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1705
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1706
- @end
1707
-
1708
-
1709
1606
  /// The source for a scan flow
1710
1607
  typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
1711
1608
  /// Scan using the camera
@@ -1738,24 +1635,6 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
1738
1635
  @end
1739
1636
 
1740
1637
 
1741
- SWIFT_CLASS("_TtC5GSSDK21GSKSerialQueueService")
1742
- @interface GSKSerialQueueService : NSObject
1743
- - (void)waitForCompletion:(void (^ _Nonnull)(void))onDone;
1744
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1745
- @end
1746
-
1747
-
1748
- SWIFT_CLASS("_TtC5GSSDK32GSKScanFlowStructuredDataService")
1749
- @interface GSKScanFlowStructuredDataService : GSKSerialQueueService
1750
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKScanFlowStructuredDataService * _Nonnull shared;)
1751
- + (GSKScanFlowStructuredDataService * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
1752
- - (void)process:(GSKScanFlowScanInternal * _Nonnull)scan configuration:(GSKScanFlowConfiguration * _Nonnull)configuration;
1753
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1754
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1755
- @end
1756
-
1757
-
1758
-
1759
1638
  SWIFT_CLASS("_TtC5GSSDK13GSKTextLayout")
1760
1639
  @interface GSKTextLayout : NSObject
1761
1640
  @property (nonatomic, readonly, copy) NSString * _Nullable hocr;
@@ -1773,72 +1652,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
1773
1652
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1774
1653
  @end
1775
1654
 
1776
- @protocol GSKUICameraViewControllerDelegate;
1777
- @class UIButton;
1778
- @class GSKCameraSession;
1779
- @class GSKScan;
1780
-
1781
- /// View controller that manages the camera UI presented by <code>GSKScanFlow</code>.
1782
- SWIFT_CLASS("_TtC5GSSDK25GSKUICameraViewController")
1783
- @interface GSKUICameraViewController : GSKCameraViewController
1784
- @property (nonatomic, readonly) UIInterfaceOrientationMask supportedInterfaceOrientations;
1785
- @property (nonatomic, weak) id <GSKUICameraViewControllerDelegate> _Nullable delegate;
1786
- @property (nonatomic, readonly, strong) UIButton * _Nonnull doneButton;
1787
- - (nonnull instancetype)initWithSession:(GSKCameraSession * _Nonnull)session configuration:(GSKScanFlowConfiguration * _Nonnull)configuration logger:(id <GSKLogger> _Nonnull)logger OBJC_DESIGNATED_INITIALIZER;
1788
- - (void)viewDidLoad;
1789
- - (void)viewWillAppear:(BOOL)animated;
1790
- - (void)cameraSessionDidSetup:(GSKCameraSession * _Nonnull)cameraSession;
1791
- - (void)cameraSessionWillSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
1792
- - (void)cameraSessionDidSnapPhoto:(GSKCameraSession * _Nonnull)cameraSession;
1793
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didGenerateScan:(GSKScan * _Nonnull)scan;
1794
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFailWithError:(NSError * _Nonnull)error;
1795
- - (void)cameraSessionIsSearchingQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
1796
- - (void)cameraSessionFailedToFindQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
1797
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession didFindQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
1798
- - (void)cameraSessionIsAboutToChooseQuadrangle:(GSKCameraSession * _Nonnull)cameraSession;
1799
- - (void)cameraSession:(GSKCameraSession * _Nonnull)cameraSession willAutoTriggerWithQuadrangle:(GSKQuadrangle * _Nonnull)quadrangle;
1800
- - (null_unspecified instancetype)initWithCameraSession:(GSKCameraSession * _Null_unspecified)cameraSession SWIFT_UNAVAILABLE;
1801
- @end
1802
-
1803
-
1804
-
1805
- /// Delegate protocol for <code>GSKUICameraViewController</code>.
1806
- SWIFT_PROTOCOL("_TtP5GSSDK33GSKUICameraViewControllerDelegate_")
1807
- @protocol GSKUICameraViewControllerDelegate
1808
- - (void)cameraViewControllerDidCancel:(GSKUICameraViewController * _Nonnull)viewController;
1809
- - (void)cameraViewControllerDone:(GSKUICameraViewController * _Nonnull)viewController;
1810
- - (void)cameraViewControllerDidSnapPhoto:(GSKUICameraViewController * _Nonnull)viewController;
1811
- - (void)cameraViewController:(GSKUICameraViewController * _Nonnull)viewController didScan:(GSKScan * _Nonnull)scan onComplete:(void (^ _Nonnull)(void))onComplete;
1812
- - (void)cameraViewController:(GSKUICameraViewController * _Nonnull)viewController didFailWithError:(NSError * _Nonnull)error;
1813
- @end
1814
-
1815
-
1816
- /// Document generator that can create file representations of
1817
- /// scans using any format defined by <code>GSKScanFlowMultiPageFormat</code>.
1818
- SWIFT_CLASS("_TtC5GSSDK22GSKUIDocumentGenerator")
1819
- @interface GSKUIDocumentGenerator : NSObject
1820
- /// Initialize an instance with a given multi-page document format.
1821
- /// Returns <code>nil</code> if the <code>none</code> multi-page format was passed.
1822
- - (nullable instancetype)initWithMultiPageFormat:(enum GSKScanFlowMultiPageFormat)multiPageFormat;
1823
- /// Generate a file representation for a document derived from
1824
- /// an array of scans. Returns a <code>URL</code> that points to the generated
1825
- /// document, or <code>nil</code> if the document generation failed.
1826
- - (NSURL * _Nullable)generateDocumentFromScans:(NSArray<GSKScanFlowScanInternal *> * _Nonnull)scans withConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
1827
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1828
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1829
- @end
1830
-
1831
-
1832
-
1833
- SWIFT_CLASS("_TtC5GSSDK15GSKUIOCRService")
1834
- @interface GSKUIOCRService : GSKSerialQueueService
1835
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIOCRService * _Nonnull shared;)
1836
- + (GSKUIOCRService * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT;
1837
- @property (nonatomic, readonly) NSInteger pendingCount;
1838
- - (void)process:(GSKScanFlowScanInternal * _Nonnull)scan configuration:(GSKScanFlowOCRConfiguration * _Nonnull)configuration;
1839
- - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1840
- @end
1841
-
1842
1655
 
1843
1656
 
1844
1657
  @interface GSKView (SWIFT_EXTENSION(GSSDK))
@@ -1861,6 +1674,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
1861
1674
 
1862
1675
 
1863
1676
 
1677
+
1678
+
1679
+
1864
1680
  @interface UIViewController (SWIFT_EXTENSION(GSSDK))
1865
1681
  /// Return a status bar style appropriate for this view controller
1866
1682
  /// based on the contrast between the status bar’s contents and the
@@ -32,6 +32,10 @@ FOUNDATION_EXPORT const unsigned char GSSDKVersionString[];
32
32
  #import <GSSDK/GSKScan.h>
33
33
  #import <GSSDK/GSKTriggerDecider.h>
34
34
  #import <GSSDK/GSKMagnifierView.h>
35
+ #import <GSSDK/MBProgressHUD.h>
35
36
 
36
37
  // ScanFlow
37
- #import <GSSDK/GSKScanFlow.h>
38
+ #import <GSSDK/GSKScanFlowPostProcessingActions.h>
39
+ #import <GSSDK/GSKScanFlowStructuredData.h>
40
+ #import <GSSDK/GSKScanFlowOCROutputFormats.h>
41
+ #import <GSSDK/GSKScanFlowErrorDomain.h>