@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/android/build.gradle
CHANGED
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKPDFGeneratorError.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 08/02/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef GSKPDFGeneratorError_h
|
|
10
|
+
#define GSKPDFGeneratorError_h
|
|
11
|
+
|
|
12
|
+
#import <Foundation/Foundation.h>
|
|
13
|
+
|
|
14
|
+
typedef NS_CLOSED_ENUM(NSInteger, GSKPDFGeneratorError)
|
|
15
|
+
{
|
|
16
|
+
GSKPDFGeneratorErrorSuccess,
|
|
17
|
+
GSKPDFGeneratorErrorInternal,
|
|
18
|
+
GSKPDFGeneratorErrorFileNotFound,
|
|
19
|
+
GSKPDFGeneratorErrorInvalidPassword,
|
|
20
|
+
GSKPDFGeneratorErrorInvalidPageSize,
|
|
21
|
+
GSKPDFGeneratorErrorProcessorError,
|
|
22
|
+
GSKPDFGeneratorErrorInvalidInput,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
#endif /* GSKPDFGeneratorError_h */
|
package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowOCROutputFormats.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#ifndef GSKScanFlowOCROutputFormats_h
|
|
2
|
+
#define GSKScanFlowOCROutputFormats_h
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
The various formats into which the OCR result can be made available.
|
|
6
|
+
|
|
7
|
+
This is an option set so you can combine multiple formats.
|
|
8
|
+
*/
|
|
9
|
+
typedef NS_OPTIONS(NSUInteger, GSKScanFlowOCROutputFormats) {
|
|
10
|
+
/// No output formats
|
|
11
|
+
GSKScanFlowOCROutputFormatsNone = 0,
|
|
12
|
+
/// Output OCR result as raw text
|
|
13
|
+
GSKScanFlowOCROutputFormatsRawText = 1 << 0,
|
|
14
|
+
/// Output OCR result in HOCR format
|
|
15
|
+
GSKScanFlowOCROutputFormatsHOCR = 1 << 1,
|
|
16
|
+
/// Add OCR result as a text layer in the generated PDF file (if any)
|
|
17
|
+
GSKScanFlowOCROutputFormatsTextLayerInPDF = 1 << 2,
|
|
18
|
+
/// All the output formats
|
|
19
|
+
GSKScanFlowOCROutputFormatsAll = NSUIntegerMax,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
#endif
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#ifndef GSKScanFlowPostProcessingActions_h
|
|
2
|
+
#define GSKScanFlowPostProcessingActions_h
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
The various image processing actions available in the post-processing screen.
|
|
6
|
+
|
|
7
|
+
This is an option set so you can combine multiple actions.
|
|
8
|
+
*/
|
|
9
|
+
typedef NS_OPTIONS(NSUInteger, GSKScanFlowPostProcessingActions) {
|
|
10
|
+
/// No actions
|
|
11
|
+
GSKScanFlowPostProcessingActionNone = 0,
|
|
12
|
+
/// The filter action
|
|
13
|
+
GSKScanFlowPostProcessingActionEditFilter = 1 << 0,
|
|
14
|
+
/// The rotate scan action
|
|
15
|
+
GSKScanFlowPostProcessingActionRotate = 1 << 1,
|
|
16
|
+
/// The distortion (book curvature) correction
|
|
17
|
+
GSKScanFlowPostProcessingActionDistortionCorrection = 1 << 2,
|
|
18
|
+
/// All the actions
|
|
19
|
+
GSKScanFlowPostProcessingActionAll = NSUIntegerMax,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
#endif
|
package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanFlowStructuredData.h
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#ifndef GSKScanFlowStructuredData_h
|
|
2
|
+
#define GSKScanFlowStructuredData_h
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
The types of structured data to extract.
|
|
6
|
+
*/
|
|
7
|
+
typedef NS_OPTIONS(NSUInteger, GSKScanFlowStructuredData) {
|
|
8
|
+
GSKScanFlowStructuredDataNone = 0,
|
|
9
|
+
/// To scan IBAN and BIC/SWIFT codes
|
|
10
|
+
GSKScanFlowStructuredDataBankDetails = 1 << 0,
|
|
11
|
+
/// To scan business card information
|
|
12
|
+
GSKScanFlowStructuredDataBusinessCard = 1 << 1,
|
|
13
|
+
/// To scan receipt/invoice information
|
|
14
|
+
GSKScanFlowStructuredDataReceipt = 1 << 2
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
#endif
|
|
@@ -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
|
|
@@ -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/
|
|
38
|
+
#import <GSSDK/GSKScanFlowPostProcessingActions.h>
|
|
39
|
+
#import <GSSDK/GSKScanFlowStructuredData.h>
|
|
40
|
+
#import <GSSDK/GSKScanFlowOCROutputFormats.h>
|
|
41
|
+
#import <GSSDK/GSKScanFlowErrorDomain.h>
|