@thegrizzlylabs/react-native-genius-scan 5.0.0-beta7 → 5.0.0-beta8
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/README.md +11 -2
- package/android/build.gradle +1 -1
- package/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +64 -26
- 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 +2530 -2107
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +57 -32
- 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 +57 -32
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
- 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/GSSDK-Swift.h +128 -52
- 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 +2530 -2107
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +57 -32
- 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 +57 -32
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +2530 -2107
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +57 -32
- 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 +57 -32
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PhoneNumberKit_PhoneNumberKit.bundle/PhoneNumberMetadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,16 @@ $ react-native link @thegrizzlylabs/react-native-genius-scan
|
|
|
42
42
|
|
|
43
43
|
### Additional steps on Android
|
|
44
44
|
|
|
45
|
-
-
|
|
45
|
+
- Open the `android/build.gradle` file, change `minSdkVersion` to `21` and add the following repository:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
allprojects {
|
|
49
|
+
repositories {
|
|
50
|
+
...
|
|
51
|
+
maven { url 'https://s3.amazonaws.com/tgl.maven' }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
46
55
|
|
|
47
56
|
### Additional steps for iOS
|
|
48
57
|
|
|
@@ -52,7 +61,7 @@ NSCameraUsageDescription - "We use the camera for <provide a good reason why you
|
|
|
52
61
|
```
|
|
53
62
|
- In your `Podfile`, add the following line:
|
|
54
63
|
```
|
|
55
|
-
platform :ios, '
|
|
64
|
+
platform :ios, '13.0'
|
|
56
65
|
```
|
|
57
66
|
|
|
58
67
|
Run `pod install` from the ios folder
|
package/android/build.gradle
CHANGED
|
@@ -10,18 +10,15 @@
|
|
|
10
10
|
<key>DebugSymbolsPath</key>
|
|
11
11
|
<string>dSYMs</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<string>ios-
|
|
13
|
+
<string>ios-arm64</string>
|
|
14
14
|
<key>LibraryPath</key>
|
|
15
15
|
<string>GSSDK.framework</string>
|
|
16
16
|
<key>SupportedArchitectures</key>
|
|
17
17
|
<array>
|
|
18
18
|
<string>arm64</string>
|
|
19
|
-
<string>x86_64</string>
|
|
20
19
|
</array>
|
|
21
20
|
<key>SupportedPlatform</key>
|
|
22
21
|
<string>ios</string>
|
|
23
|
-
<key>SupportedPlatformVariant</key>
|
|
24
|
-
<string>simulator</string>
|
|
25
22
|
</dict>
|
|
26
23
|
<dict>
|
|
27
24
|
<key>BinaryPath</key>
|
|
@@ -29,15 +26,18 @@
|
|
|
29
26
|
<key>DebugSymbolsPath</key>
|
|
30
27
|
<string>dSYMs</string>
|
|
31
28
|
<key>LibraryIdentifier</key>
|
|
32
|
-
<string>ios-
|
|
29
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
33
30
|
<key>LibraryPath</key>
|
|
34
31
|
<string>GSSDK.framework</string>
|
|
35
32
|
<key>SupportedArchitectures</key>
|
|
36
33
|
<array>
|
|
37
34
|
<string>arm64</string>
|
|
35
|
+
<string>x86_64</string>
|
|
38
36
|
</array>
|
|
39
37
|
<key>SupportedPlatform</key>
|
|
40
38
|
<string>ios</string>
|
|
39
|
+
<key>SupportedPlatformVariant</key>
|
|
40
|
+
<string>simulator</string>
|
|
41
41
|
</dict>
|
|
42
42
|
</array>
|
|
43
43
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
@@ -419,7 +419,7 @@ SWIFT_CLASS("_TtC5GSSDK12GSKOCRResult")
|
|
|
419
419
|
@property (nonatomic, readonly, copy) NSString * _Nonnull text;
|
|
420
420
|
/// The recognized text, as a structured text layout.
|
|
421
421
|
@property (nonatomic, readonly, strong) GSKTextLayout * _Nonnull textLayout;
|
|
422
|
-
- (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout
|
|
422
|
+
- (nonnull instancetype)initWithText:(NSString * _Nonnull)text textLayout:(GSKTextLayout * _Nonnull)textLayout;
|
|
423
423
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
424
424
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
425
425
|
@end
|
|
@@ -637,6 +637,10 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
637
637
|
@end
|
|
638
638
|
|
|
639
639
|
|
|
640
|
+
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
641
|
+
- (BOOL)validate:(NSError * _Nullable * _Nullable)error;
|
|
642
|
+
@end
|
|
643
|
+
|
|
640
644
|
|
|
641
645
|
|
|
642
646
|
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
@@ -647,10 +651,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
|
|
|
647
651
|
@end
|
|
648
652
|
|
|
649
653
|
|
|
650
|
-
@interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
|
|
651
|
-
- (BOOL)validate:(NSError * _Nullable * _Nullable)error;
|
|
652
|
-
@end
|
|
653
|
-
|
|
654
654
|
/// Enum that defines various errors that can occur during a scan flow.
|
|
655
655
|
typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
|
|
656
656
|
/// User has canceled the scan flow
|
|
@@ -783,29 +783,29 @@ typedef SWIFT_ENUM(NSUInteger, GSKScanFlowSource, open) {
|
|
|
783
783
|
GSKScanFlowSourceLibrary = 2,
|
|
784
784
|
};
|
|
785
785
|
|
|
786
|
-
@class
|
|
787
|
-
@class
|
|
788
|
-
@class
|
|
786
|
+
@class GSKStructuredDataBankDetails;
|
|
787
|
+
@class GSKStructuredDataContact;
|
|
788
|
+
@class GSKStructuredDataReceipt;
|
|
789
789
|
|
|
790
790
|
/// The result of a structured data extraction.
|
|
791
791
|
SWIFT_CLASS("_TtC5GSSDK31GSKScanFlowStructuredDataResult")
|
|
792
792
|
@interface GSKScanFlowStructuredDataResult : NSObject
|
|
793
793
|
/// Present if bank details extraction was requested, <code>nil</code> otherwise.
|
|
794
|
-
@property (nonatomic, strong)
|
|
794
|
+
@property (nonatomic, strong) GSKStructuredDataBankDetails * _Nullable bankDetails;
|
|
795
795
|
/// Present if business card contact extraction was requested and a contact was
|
|
796
796
|
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
797
|
-
@property (nonatomic, strong)
|
|
797
|
+
@property (nonatomic, strong) GSKStructuredDataContact * _Nullable businessCardContact;
|
|
798
798
|
/// Present if receipt extraction was requested and a receipt/invoice was
|
|
799
799
|
/// succcessfully extracted, <code>nil</code> otherwise.
|
|
800
|
-
@property (nonatomic, strong)
|
|
800
|
+
@property (nonatomic, strong) GSKStructuredDataReceipt * _Nullable receipt;
|
|
801
801
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
802
802
|
@end
|
|
803
803
|
|
|
804
804
|
|
|
805
805
|
|
|
806
806
|
/// Address data extracted from a business card document through OCR.
|
|
807
|
-
SWIFT_CLASS("
|
|
808
|
-
@interface
|
|
807
|
+
SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataAddress")
|
|
808
|
+
@interface GSKStructuredDataAddress : NSObject
|
|
809
809
|
/// The city component of the address.
|
|
810
810
|
@property (nonatomic, readonly, copy) NSString * _Nullable city;
|
|
811
811
|
/// The postal/zip code component of the address.
|
|
@@ -823,30 +823,31 @@ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultAddress")
|
|
|
823
823
|
|
|
824
824
|
|
|
825
825
|
/// The bank details extracted from a document through OCR.
|
|
826
|
-
SWIFT_CLASS("
|
|
827
|
-
@interface
|
|
826
|
+
SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataBankDetails")
|
|
827
|
+
@interface GSKStructuredDataBankDetails : NSObject
|
|
828
828
|
/// The IBAN if successfully extracted, otherwise is <code>nil</code>.
|
|
829
829
|
@property (nonatomic, copy) NSString * _Nullable iban;
|
|
830
830
|
/// The BIC code if successfully extracted, otherwise is <code>nil</code>.
|
|
831
831
|
@property (nonatomic, copy) NSString * _Nullable bic;
|
|
832
|
-
- (nonnull instancetype)init
|
|
832
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
833
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
833
834
|
@end
|
|
834
835
|
|
|
835
836
|
|
|
836
|
-
@class
|
|
837
|
+
@class GSKStructuredDataPhoneNumber;
|
|
837
838
|
@class CNContact;
|
|
838
839
|
|
|
839
840
|
/// Contact data extracted from a business card document through OCR.
|
|
840
|
-
SWIFT_CLASS("
|
|
841
|
-
@interface
|
|
841
|
+
SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataContact")
|
|
842
|
+
@interface GSKStructuredDataContact : NSObject
|
|
842
843
|
/// Any name that appears on the business card. Contains the full name, including all components.
|
|
843
844
|
@property (nonatomic, readonly, copy) NSString * _Nullable name;
|
|
844
845
|
/// Any organization that appears on the business card.
|
|
845
846
|
@property (nonatomic, readonly, copy) NSString * _Nullable organization;
|
|
846
847
|
/// Any address that appears on the business card.
|
|
847
|
-
@property (nonatomic, readonly, strong)
|
|
848
|
+
@property (nonatomic, readonly, strong) GSKStructuredDataAddress * _Nullable address;
|
|
848
849
|
/// The phone numbers that appear on the business card.
|
|
849
|
-
@property (nonatomic, readonly, copy) NSArray<
|
|
850
|
+
@property (nonatomic, readonly, copy) NSArray<GSKStructuredDataPhoneNumber *> * _Nonnull phoneNumbers;
|
|
850
851
|
/// The links/URLs that appear on the business card.
|
|
851
852
|
@property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull links;
|
|
852
853
|
/// The email addresses that appear on the business card.
|
|
@@ -859,9 +860,46 @@ SWIFT_CLASS("_TtC5GSSDK38GSKScanFlowStructuredDataResultContact")
|
|
|
859
860
|
|
|
860
861
|
|
|
861
862
|
|
|
863
|
+
/// Class that enables structured data to be extracted from
|
|
864
|
+
/// scanned documents.
|
|
865
|
+
SWIFT_CLASS("_TtC5GSSDK26GSKStructuredDataExtractor")
|
|
866
|
+
@interface GSKStructuredDataExtractor : NSObject
|
|
867
|
+
- (nonnull instancetype)init;
|
|
868
|
+
@end
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
@interface GSKStructuredDataExtractor (SWIFT_EXTENSION(GSSDK))
|
|
873
|
+
/// Extract any bank details that were found in a given document by
|
|
874
|
+
/// passing in the result of performing OCR on that document. Use
|
|
875
|
+
/// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
|
|
876
|
+
/// was performed for languages that don’t support structured data extraction,
|
|
877
|
+
/// then this method will throw an error.
|
|
878
|
+
- (void)bankDetailsFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataBankDetails * _Nullable, NSError * _Nullable))completionHandler;
|
|
879
|
+
/// Extract any business card contact that was found in a given document
|
|
880
|
+
/// by passing in the result of performing OCR on that document. Use
|
|
881
|
+
/// <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
|
|
882
|
+
/// was performed for languages that don’t support structured data extraction,
|
|
883
|
+
/// then this method will throw an error.
|
|
884
|
+
- (void)businessCardContactFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataContact * _Nullable, NSError * _Nullable))completionHandler;
|
|
885
|
+
/// Extract any receipt/invoice information that was found in a given
|
|
886
|
+
/// document by passing in the result of performing OCR on that document.
|
|
887
|
+
/// Use <code>GSKOCR</code> to obtain a <code>GSKOCRResult</code> instance. Note that if OCR
|
|
888
|
+
/// was performed for languages that don’t support structured data extraction,
|
|
889
|
+
/// then this method will throw an error.
|
|
890
|
+
- (void)receiptFromOCRResult:(GSKOCRResult * _Nonnull)ocrResult completionHandler:(void (^ _Nonnull)(GSKStructuredDataReceipt * _Nullable, NSError * _Nullable))completionHandler;
|
|
891
|
+
@end
|
|
892
|
+
|
|
893
|
+
/// Enum defining errors that can be thrown by <code>GSKStructuredDataExtractor</code>.
|
|
894
|
+
/// Note that thrown errors will be wrapped in <code>NSError</code> containers.
|
|
895
|
+
typedef SWIFT_ENUM(NSInteger, GSKStructuredDataExtractorError, open) {
|
|
896
|
+
GSKStructuredDataExtractorErrorMissingRequiredOCRMetadata = -1,
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
|
|
862
900
|
/// Phone number data extracted from a business card document through OCR.
|
|
863
|
-
SWIFT_CLASS("
|
|
864
|
-
@interface
|
|
901
|
+
SWIFT_CLASS("_TtC5GSSDK28GSKStructuredDataPhoneNumber")
|
|
902
|
+
@interface GSKStructuredDataPhoneNumber : NSObject
|
|
865
903
|
/// The label of the phone number. For example “Main”, “Office”, etc.
|
|
866
904
|
@property (nonatomic, readonly, copy) NSString * _Nonnull label;
|
|
867
905
|
/// A string representation of the phone number itself.
|
|
@@ -874,8 +912,8 @@ SWIFT_CLASS("_TtC5GSSDK42GSKScanFlowStructuredDataResultPhoneNumber")
|
|
|
874
912
|
@class NSLocale;
|
|
875
913
|
|
|
876
914
|
/// Receipt/invoice details extracted from a document through OCR.
|
|
877
|
-
SWIFT_CLASS("
|
|
878
|
-
@interface
|
|
915
|
+
SWIFT_CLASS("_TtC5GSSDK24GSKStructuredDataReceipt")
|
|
916
|
+
@interface GSKStructuredDataReceipt : NSObject
|
|
879
917
|
/// The locale that the receipt is in, if successfully extracted, otherwise <code>nil</code>.
|
|
880
918
|
@property (nonatomic, readonly, copy) NSLocale * _Nullable locale;
|
|
881
919
|
/// The merchant that the receipt is from, if successfully extracted, otherwise <code>nil</code>.
|
|
@@ -931,12 +969,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKUIBackgro
|
|
|
931
969
|
@end
|
|
932
970
|
|
|
933
971
|
|
|
934
|
-
|
|
935
972
|
@interface GSKView (SWIFT_EXTENSION(GSSDK))
|
|
936
973
|
- (void)startSnapAnimationWithDuration:(NSTimeInterval)duration;
|
|
937
974
|
- (void)endSnapAnimation;
|
|
938
975
|
@end
|
|
939
976
|
|
|
977
|
+
|
|
940
978
|
@class NSBundle;
|
|
941
979
|
|
|
942
980
|
SWIFT_CLASS("_TtC5GSSDK14GSSDKResources")
|
|
Binary file
|