@thegrizzlylabs/react-native-genius-scan 5.0.0-beta1 → 5.0.0-beta3
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.
- package/android/build.gradle +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterType.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowErrorDomain.h +7 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowOCROutputFormats.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowPostProcessingActions.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +17 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +129 -126
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +5 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/MBProgressHUD.h +411 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +10120 -9684
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +100 -113
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +100 -113
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterType.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKPDFGeneratorError.h +25 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowErrorDomain.h +7 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowOCROutputFormats.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowPostProcessingActions.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlowStructuredData.h +17 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +258 -252
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +5 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/MBProgressHUD.h +411 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +10120 -9684
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +100 -113
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +100 -113
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +10120 -9684
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +100 -113
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +100 -113
- package/package.json +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlow.h +0 -91
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanFlow.h +0 -91
package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h
CHANGED
|
@@ -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,48 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
|
|
|
523
511
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
524
512
|
@end
|
|
525
513
|
|
|
514
|
+
typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
|
|
515
|
+
GSKReceiptCategoryGas = 0,
|
|
516
|
+
GSKReceiptCategoryTransportation = 1,
|
|
517
|
+
GSKReceiptCategoryAccomodation = 2,
|
|
518
|
+
GSKReceiptCategoryRestaurant = 3,
|
|
519
|
+
GSKReceiptCategorySupermarket = 4,
|
|
520
|
+
GSKReceiptCategoryOther = 5,
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
@class GSKScanFlowConfiguration;
|
|
524
|
+
@class UIViewController;
|
|
525
|
+
@class GSKScanFlowResult;
|
|
526
|
+
|
|
527
|
+
/// A high-level scanner module.
|
|
528
|
+
/// You present it and when the user is done, you obtain a result object containing the scanned documents.
|
|
529
|
+
/// The scan flow can be customized with a <code>GSKScanFlowConfiguration</code> instance.
|
|
530
|
+
SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
|
|
531
|
+
@interface GSKScanFlow : NSObject
|
|
532
|
+
- (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
|
|
533
|
+
/// Present the scan flow. Asynchronously returns a <code>GSKScanFlowResult</code> object, which
|
|
534
|
+
/// gives you access to the scanned documents, or throws any error that was encountered.
|
|
535
|
+
/// @param viewController The view controller to present the scan flow from.
|
|
536
|
+
- (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
|
|
537
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
538
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
539
|
+
@end
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
@interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
|
|
543
|
+
/// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
|
|
544
|
+
/// This initializer is only available from Objective-C.
|
|
545
|
+
+ (nonnull instancetype)scanFlowWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
|
|
546
|
+
/// Present the scan flow.
|
|
547
|
+
/// @param viewController The view controller to present the scan flow from.
|
|
548
|
+
/// @param completionBlock A completion block/closure that will be called on the main
|
|
549
|
+
/// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
|
|
550
|
+
/// a parameter. This object gives you access to the scanned documents.
|
|
551
|
+
/// @param errorBlock A block/closure called if an error was encountered.
|
|
552
|
+
- (void)startFrom:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
|
|
553
|
+
@end
|
|
554
|
+
|
|
555
|
+
|
|
526
556
|
enum GSKScanFlowSource : NSUInteger;
|
|
527
557
|
@class NSURL;
|
|
528
558
|
enum GSKScanFlowFilterType : NSInteger;
|
|
@@ -606,6 +636,11 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
606
636
|
@end
|
|
607
637
|
|
|
608
638
|
|
|
639
|
+
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
640
|
+
- (BOOL)validate:(NSError * _Nullable * _Nullable)error;
|
|
641
|
+
@end
|
|
642
|
+
|
|
643
|
+
|
|
609
644
|
|
|
610
645
|
/// Enum that defines various errors that can occur during a scan flow.
|
|
611
646
|
typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
|
|
@@ -659,6 +694,7 @@ SWIFT_CLASS("_TtC5GSSDK27GSKScanFlowOCRConfiguration")
|
|
|
659
694
|
|
|
660
695
|
|
|
661
696
|
|
|
697
|
+
|
|
662
698
|
/// The result of the text recognition.
|
|
663
699
|
SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
|
|
664
700
|
@interface GSKScanFlowOCRResult : NSObject
|
|
@@ -669,6 +705,8 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
|
|
|
669
705
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
670
706
|
@end
|
|
671
707
|
|
|
708
|
+
|
|
709
|
+
|
|
672
710
|
/// The generated PDF paper size.
|
|
673
711
|
typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
|
|
674
712
|
/// PDF page with a width of 8.27 inch (A4 width) and fitting height.
|
|
@@ -726,45 +764,6 @@ SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
|
|
|
726
764
|
@end
|
|
727
765
|
|
|
728
766
|
|
|
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
767
|
/// The source for a scan flow
|
|
769
768
|
typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
|
|
770
769
|
/// Scan using the camera
|
|
@@ -776,16 +775,44 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
|
|
|
776
775
|
};
|
|
777
776
|
|
|
778
777
|
@class GSKScanFlowStructuredDataResultBankDetails;
|
|
778
|
+
@class GSKScanFlowStructuredDataResultContact;
|
|
779
|
+
@class GSKScanFlowStructuredDataResultReceipt;
|
|
779
780
|
|
|
780
781
|
/// The result of a structured data extraction.
|
|
781
782
|
SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
|
|
782
783
|
@interface GSKScanFlowStructuredDataResult : NSObject
|
|
783
784
|
/// Present if bank details extraction was requested, <code>nil</code> otherwise.
|
|
784
785
|
@property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
|
|
786
|
+
/// Present if business card contact extraction was requested and a contact was
|
|
787
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
788
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
|
|
789
|
+
/// Present if receipt extraction was requested and a receipt/invoice was
|
|
790
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
791
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
|
|
785
792
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
786
793
|
@end
|
|
787
794
|
|
|
788
795
|
|
|
796
|
+
|
|
797
|
+
/// Address data extracted from a business card document through OCR.
|
|
798
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
|
|
799
|
+
@interface GSKScanFlowStructuredDataResultAddress : NSObject
|
|
800
|
+
/// The city component of the address.
|
|
801
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable city;
|
|
802
|
+
/// The postal/zip code component of the address.
|
|
803
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
|
|
804
|
+
/// The street name component of the address.
|
|
805
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable street;
|
|
806
|
+
/// The state component of the address.
|
|
807
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable state;
|
|
808
|
+
/// The country component of the address.
|
|
809
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable country;
|
|
810
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
811
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
812
|
+
@end
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
789
816
|
/// The bank details extracted from a document through OCR.
|
|
790
817
|
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
791
818
|
@interface GSKScanFlowStructuredDataResultBankDetails : NSObject
|
|
@@ -797,18 +824,57 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
|
797
824
|
@end
|
|
798
825
|
|
|
799
826
|
|
|
800
|
-
|
|
801
|
-
@
|
|
802
|
-
|
|
803
|
-
|
|
827
|
+
@class GSKScanFlowStructuredDataResultPhoneNumber;
|
|
828
|
+
@class CNContact;
|
|
829
|
+
|
|
830
|
+
/// Contact data extracted from a business card document through OCR.
|
|
831
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
|
|
832
|
+
@interface GSKScanFlowStructuredDataResultContact : NSObject
|
|
833
|
+
/// Any name that appears on the business card. Contains the full name, including all components.
|
|
834
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable name;
|
|
835
|
+
/// Any organization that appears on the business card.
|
|
836
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable organization;
|
|
837
|
+
/// Any address that appears on the business card.
|
|
838
|
+
@property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
|
|
839
|
+
/// The phone numbers that appear on the business card.
|
|
840
|
+
@property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
|
|
841
|
+
/// The links/URLs that appear on the business card.
|
|
842
|
+
@property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
|
|
843
|
+
/// The email addresses that appear on the business card.
|
|
844
|
+
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
|
|
845
|
+
/// Return a <code>CNContact</code> representation of the contact data within this instance.
|
|
846
|
+
- (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
|
|
847
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
848
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
804
849
|
@end
|
|
805
850
|
|
|
806
851
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
852
|
+
|
|
853
|
+
/// Phone number data extracted from a business card document through OCR.
|
|
854
|
+
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
|
|
855
|
+
@interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
|
|
856
|
+
/// The label of the phone number. For example “Main”, “Office”, etc.
|
|
857
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull label;
|
|
858
|
+
/// A string representation of the phone number itself.
|
|
859
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull number;
|
|
860
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
861
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
862
|
+
@end
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
@class NSLocale;
|
|
866
|
+
|
|
867
|
+
/// Receipt/invoice details extracted from a document through OCR.
|
|
868
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
|
|
869
|
+
@interface GSKScanFlowStructuredDataResultReceipt : NSObject
|
|
870
|
+
/// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
871
|
+
@property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
|
|
872
|
+
/// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
|
|
873
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable merchant;
|
|
874
|
+
/// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
875
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable currency;
|
|
876
|
+
/// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
|
|
877
|
+
@property (nonatomic, readonly, copy) NSDate * _Nullable date;
|
|
812
878
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
813
879
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
814
880
|
@end
|
|
@@ -832,72 +898,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
|
|
|
832
898
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
833
899
|
@end
|
|
834
900
|
|
|
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
901
|
|
|
902
902
|
|
|
903
903
|
@interface GSKView (SWIFT_EXTENSION(GSSDK))
|
|
@@ -920,6 +920,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
|
|
|
920
920
|
|
|
921
921
|
|
|
922
922
|
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
923
926
|
@interface UIViewController (SWIFT_EXTENSION(GSSDK))
|
|
924
927
|
/// Return a status bar style appropriate for this view controller
|
|
925
928
|
/// based on the contrast between the status bar’s contents and the
|
|
@@ -1218,7 +1221,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
1218
1221
|
#if __has_warning("-Watimport-in-framework-header")
|
|
1219
1222
|
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
|
1220
1223
|
#endif
|
|
1221
|
-
@import CoreFoundation;
|
|
1222
1224
|
@import Dispatch;
|
|
1223
1225
|
@import Foundation;
|
|
1224
1226
|
@import ObjectiveC;
|
|
@@ -1245,17 +1247,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
1245
1247
|
#endif
|
|
1246
1248
|
|
|
1247
1249
|
#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
1250
|
|
|
1260
1251
|
|
|
1261
1252
|
|
|
@@ -1464,6 +1455,48 @@ SWIFT_CLASS("_TtC5GSSDK10GSKPDFSize")
|
|
|
1464
1455
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1465
1456
|
@end
|
|
1466
1457
|
|
|
1458
|
+
typedef SWIFT_ENUM(NSInteger, GSKReceiptCategory, open) {
|
|
1459
|
+
GSKReceiptCategoryGas = 0,
|
|
1460
|
+
GSKReceiptCategoryTransportation = 1,
|
|
1461
|
+
GSKReceiptCategoryAccomodation = 2,
|
|
1462
|
+
GSKReceiptCategoryRestaurant = 3,
|
|
1463
|
+
GSKReceiptCategorySupermarket = 4,
|
|
1464
|
+
GSKReceiptCategoryOther = 5,
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1467
|
+
@class GSKScanFlowConfiguration;
|
|
1468
|
+
@class UIViewController;
|
|
1469
|
+
@class GSKScanFlowResult;
|
|
1470
|
+
|
|
1471
|
+
/// A high-level scanner module.
|
|
1472
|
+
/// You present it and when the user is done, you obtain a result object containing the scanned documents.
|
|
1473
|
+
/// The scan flow can be customized with a <code>GSKScanFlowConfiguration</code> instance.
|
|
1474
|
+
SWIFT_CLASS("_TtC5GSSDK11GSKScanFlow")
|
|
1475
|
+
@interface GSKScanFlow : NSObject
|
|
1476
|
+
- (nonnull instancetype)initWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration OBJC_DESIGNATED_INITIALIZER;
|
|
1477
|
+
/// Present the scan flow. Asynchronously returns a <code>GSKScanFlowResult</code> object, which
|
|
1478
|
+
/// gives you access to the scanned documents, or throws any error that was encountered.
|
|
1479
|
+
/// @param viewController The view controller to present the scan flow from.
|
|
1480
|
+
- (void)resultByStartingFromViewController:(UIViewController * _Nonnull)viewController completionHandler:(void (^ _Nonnull)(GSKScanFlowResult * _Nullable, NSError * _Nullable))completionHandler;
|
|
1481
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1482
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1483
|
+
@end
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
@interface GSKScanFlow (SWIFT_EXTENSION(GSSDK))
|
|
1487
|
+
/// Instantiates a <code>GSKScanFlow</code> instance with the provided configuration.
|
|
1488
|
+
/// This initializer is only available from Objective-C.
|
|
1489
|
+
+ (nonnull instancetype)scanFlowWithConfiguration:(GSKScanFlowConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
|
|
1490
|
+
/// Present the scan flow.
|
|
1491
|
+
/// @param viewController The view controller to present the scan flow from.
|
|
1492
|
+
/// @param completionBlock A completion block/closure that will be called on the main
|
|
1493
|
+
/// thread upon completion of the scan flow. It receives a <code>GSKScanFlowResult</code> object as
|
|
1494
|
+
/// a parameter. This object gives you access to the scanned documents.
|
|
1495
|
+
/// @param errorBlock A block/closure called if an error was encountered.
|
|
1496
|
+
- (void)startFrom:(UIViewController * _Nonnull)viewController onSuccess:(void (^ _Nonnull)(GSKScanFlowResult * _Nonnull))completionBlock failure:(void (^ _Nonnull)(NSError * _Nonnull))errorBlock;
|
|
1497
|
+
@end
|
|
1498
|
+
|
|
1499
|
+
|
|
1467
1500
|
enum GSKScanFlowSource : NSUInteger;
|
|
1468
1501
|
@class NSURL;
|
|
1469
1502
|
enum GSKScanFlowFilterType : NSInteger;
|
|
@@ -1547,6 +1580,11 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
1547
1580
|
@end
|
|
1548
1581
|
|
|
1549
1582
|
|
|
1583
|
+
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
1584
|
+
- (BOOL)validate:(NSError * _Nullable * _Nullable)error;
|
|
1585
|
+
@end
|
|
1586
|
+
|
|
1587
|
+
|
|
1550
1588
|
|
|
1551
1589
|
/// Enum that defines various errors that can occur during a scan flow.
|
|
1552
1590
|
typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
|
|
@@ -1600,6 +1638,7 @@ SWIFT_CLASS("_TtC5GSSDK27GSKScanFlowOCRConfiguration")
|
|
|
1600
1638
|
|
|
1601
1639
|
|
|
1602
1640
|
|
|
1641
|
+
|
|
1603
1642
|
/// The result of the text recognition.
|
|
1604
1643
|
SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
|
|
1605
1644
|
@interface GSKScanFlowOCRResult : NSObject
|
|
@@ -1610,6 +1649,8 @@ SWIFT_CLASS("_TtC5GSSDK20GSKScanFlowOCRResult")
|
|
|
1610
1649
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1611
1650
|
@end
|
|
1612
1651
|
|
|
1652
|
+
|
|
1653
|
+
|
|
1613
1654
|
/// The generated PDF paper size.
|
|
1614
1655
|
typedef SWIFT_ENUM(NSUInteger, GSKScanFlowPDFPageSize, open) {
|
|
1615
1656
|
/// PDF page with a width of 8.27 inch (A4 width) and fitting height.
|
|
@@ -1667,45 +1708,6 @@ SWIFT_CLASS("_TtC5GSSDK15GSKScanFlowScan")
|
|
|
1667
1708
|
@end
|
|
1668
1709
|
|
|
1669
1710
|
|
|
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
1711
|
/// The source for a scan flow
|
|
1710
1712
|
typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
|
|
1711
1713
|
/// Scan using the camera
|
|
@@ -1717,16 +1719,44 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
|
|
|
1717
1719
|
};
|
|
1718
1720
|
|
|
1719
1721
|
@class GSKScanFlowStructuredDataResultBankDetails;
|
|
1722
|
+
@class GSKScanFlowStructuredDataResultContact;
|
|
1723
|
+
@class GSKScanFlowStructuredDataResultReceipt;
|
|
1720
1724
|
|
|
1721
1725
|
/// The result of a structured data extraction.
|
|
1722
1726
|
SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
|
|
1723
1727
|
@interface GSKScanFlowStructuredDataResult : NSObject
|
|
1724
1728
|
/// Present if bank details extraction was requested, <code>nil</code> otherwise.
|
|
1725
1729
|
@property (nonatomic, strong) GSKScanFlowStructuredDataResultBankDetails * _Nullable bankDetails;
|
|
1730
|
+
/// Present if business card contact extraction was requested and a contact was
|
|
1731
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
1732
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultContact * _Nullable businessCardContact;
|
|
1733
|
+
/// Present if receipt extraction was requested and a receipt/invoice was
|
|
1734
|
+
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
1735
|
+
@property (nonatomic, strong) GSKScanFlowStructuredDataResultReceipt * _Nullable receipt;
|
|
1726
1736
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1727
1737
|
@end
|
|
1728
1738
|
|
|
1729
1739
|
|
|
1740
|
+
|
|
1741
|
+
/// Address data extracted from a business card document through OCR.
|
|
1742
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
|
|
1743
|
+
@interface GSKScanFlowStructuredDataResultAddress : NSObject
|
|
1744
|
+
/// The city component of the address.
|
|
1745
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable city;
|
|
1746
|
+
/// The postal/zip code component of the address.
|
|
1747
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable postalCode;
|
|
1748
|
+
/// The street name component of the address.
|
|
1749
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable street;
|
|
1750
|
+
/// The state component of the address.
|
|
1751
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable state;
|
|
1752
|
+
/// The country component of the address.
|
|
1753
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable country;
|
|
1754
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1755
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1756
|
+
@end
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1730
1760
|
/// The bank details extracted from a document through OCR.
|
|
1731
1761
|
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
1732
1762
|
@interface GSKScanFlowStructuredDataResultBankDetails : NSObject
|
|
@@ -1738,18 +1768,57 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultBankDetails")
|
|
|
1738
1768
|
@end
|
|
1739
1769
|
|
|
1740
1770
|
|
|
1741
|
-
|
|
1742
|
-
@
|
|
1743
|
-
|
|
1744
|
-
|
|
1771
|
+
@class GSKScanFlowStructuredDataResultPhoneNumber;
|
|
1772
|
+
@class CNContact;
|
|
1773
|
+
|
|
1774
|
+
/// Contact data extracted from a business card document through OCR.
|
|
1775
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
|
|
1776
|
+
@interface GSKScanFlowStructuredDataResultContact : NSObject
|
|
1777
|
+
/// Any name that appears on the business card. Contains the full name, including all components.
|
|
1778
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable name;
|
|
1779
|
+
/// Any organization that appears on the business card.
|
|
1780
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable organization;
|
|
1781
|
+
/// Any address that appears on the business card.
|
|
1782
|
+
@property (nonatomic, readonly, strong) GSKScanFlowStructuredDataResultAddress * _Nullable address;
|
|
1783
|
+
/// The phone numbers that appear on the business card.
|
|
1784
|
+
@property (nonatomic, readonly, copy) NSArray<GSKScanFlowStructuredDataResultPhoneNumber *> * _Nonnull phoneNumbers;
|
|
1785
|
+
/// The links/URLs that appear on the business card.
|
|
1786
|
+
@property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
|
|
1787
|
+
/// The email addresses that appear on the business card.
|
|
1788
|
+
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull emailAddresses;
|
|
1789
|
+
/// Return a <code>CNContact</code> representation of the contact data within this instance.
|
|
1790
|
+
- (CNContact * _Nonnull)asCNContact SWIFT_WARN_UNUSED_RESULT;
|
|
1791
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1792
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1745
1793
|
@end
|
|
1746
1794
|
|
|
1747
1795
|
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1796
|
+
|
|
1797
|
+
/// Phone number data extracted from a business card document through OCR.
|
|
1798
|
+
SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
|
|
1799
|
+
@interface GSKScanFlowStructuredDataResultPhoneNumber : NSObject
|
|
1800
|
+
/// The label of the phone number. For example “Main”, “Office”, etc.
|
|
1801
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull label;
|
|
1802
|
+
/// A string representation of the phone number itself.
|
|
1803
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull number;
|
|
1804
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1805
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1806
|
+
@end
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
@class NSLocale;
|
|
1810
|
+
|
|
1811
|
+
/// Receipt/invoice details extracted from a document through OCR.
|
|
1812
|
+
SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultReceipt")
|
|
1813
|
+
@interface GSKScanFlowStructuredDataResultReceipt : NSObject
|
|
1814
|
+
/// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
1815
|
+
@property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
|
|
1816
|
+
/// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
|
|
1817
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable merchant;
|
|
1818
|
+
/// The code of currency that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
1819
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable currency;
|
|
1820
|
+
/// Any date that appears on the receipt, if successfully extracted, otherwise <code>nil</code>.
|
|
1821
|
+
@property (nonatomic, readonly, copy) NSDate * _Nullable date;
|
|
1753
1822
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1754
1823
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1755
1824
|
@end
|
|
@@ -1773,72 +1842,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
|
|
|
1773
1842
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1774
1843
|
@end
|
|
1775
1844
|
|
|
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
1845
|
|
|
1843
1846
|
|
|
1844
1847
|
@interface GSKView (SWIFT_EXTENSION(GSSDK))
|
|
@@ -1861,6 +1864,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSBundle * _
|
|
|
1861
1864
|
|
|
1862
1865
|
|
|
1863
1866
|
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
|
|
1864
1870
|
@interface UIViewController (SWIFT_EXTENSION(GSSDK))
|
|
1865
1871
|
/// Return a status bar style appropriate for this view controller
|
|
1866
1872
|
/// based on the contrast between the status bar’s contents and the
|