diff --git a/BlinkCard/android/build.gradle b/BlinkCard/android/build.gradle index 919e860..4ad0d99 100644 --- a/BlinkCard/android/build.gradle +++ b/BlinkCard/android/build.gradle @@ -16,7 +16,7 @@ rootProject.allprojects { repositories { google() jcenter() - maven { url 'http://maven.microblink.com' } + maven { url 'https://maven.microblink.com' } } } @@ -34,7 +34,7 @@ android { } dependencies { - implementation('com.microblink:blinkcard:2.4.0@aar') { + implementation('com.microblink:blinkcard:2.6.0@aar') { transitive = true } } diff --git a/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/BlinkCardRecognizerSerialization.java b/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/BlinkCardRecognizerSerialization.java index 9066523..0ef3889 100644 --- a/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/BlinkCardRecognizerSerialization.java +++ b/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/BlinkCardRecognizerSerialization.java @@ -22,7 +22,6 @@ public Recognizer createRecognizer(JSONObject jsonObject) { recognizer.setFullDocumentImageExtensionFactors(SerializationUtils.deserializeExtensionFactors(jsonObject.optJSONObject("fullDocumentImageExtensionFactors"))); recognizer.setPaddingEdge((float)jsonObject.optDouble("paddingEdge", 0.0)); recognizer.setReturnFullDocumentImage(jsonObject.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonObject.optBoolean("signResult", false)); return recognizer; } @@ -36,8 +35,6 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("cardNumberPrefix", result.getCardNumberPrefix()); jsonResult.put("cardNumberValid", result.isCardNumberValid()); jsonResult.put("cvv", result.getCvv()); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); jsonResult.put("expiryDate", SerializationUtils.serializeDate(result.getExpiryDate())); jsonResult.put("firstSideBlurred", result.isFirstSideBlurred()); jsonResult.put("firstSideFullDocumentImage", SerializationUtils.encodeImageBase64(result.getFirstSideFullDocumentImage())); diff --git a/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardEliteRecognizerSerialization.java b/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardEliteRecognizerSerialization.java index cf3477c..107cef1 100644 --- a/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardEliteRecognizerSerialization.java +++ b/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardEliteRecognizerSerialization.java @@ -22,7 +22,6 @@ public Recognizer createRecognizer(JSONObject jsonObject) { recognizer.setFullDocumentImageDpi(jsonObject.optInt("fullDocumentImageDpi", 250)); recognizer.setFullDocumentImageExtensionFactors(SerializationUtils.deserializeExtensionFactors(jsonObject.optJSONObject("fullDocumentImageExtensionFactors"))); recognizer.setReturnFullDocumentImage(jsonObject.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonObject.optBoolean("signResult", false)); return recognizer; } @@ -34,8 +33,6 @@ public JSONObject serializeResult(Recognizer recognizer) { SerializationUtils.addCommonRecognizerResultData(jsonResult, result); jsonResult.put("cardNumber", result.getCardNumber()); jsonResult.put("cvv", result.getCvv()); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); jsonResult.put("documentDataMatch", SerializationUtils.serializeEnum(result.getDocumentDataMatch())); jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); diff --git a/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardRecognizerSerialization.java b/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardRecognizerSerialization.java index e9b6b98..55c71b6 100644 --- a/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardRecognizerSerialization.java +++ b/BlinkCard/android/src/main/java/com/microblink/blinkcard/flutter/recognizers/serialization/LegacyBlinkCardRecognizerSerialization.java @@ -25,7 +25,6 @@ public Recognizer createRecognizer(JSONObject jsonObject) { recognizer.setFullDocumentImageDpi(jsonObject.optInt("fullDocumentImageDpi", 250)); recognizer.setFullDocumentImageExtensionFactors(SerializationUtils.deserializeExtensionFactors(jsonObject.optJSONObject("fullDocumentImageExtensionFactors"))); recognizer.setReturnFullDocumentImage(jsonObject.optBoolean("returnFullDocumentImage", false)); - recognizer.setSignResult(jsonObject.optBoolean("signResult", false)); return recognizer; } @@ -37,8 +36,6 @@ public JSONObject serializeResult(Recognizer recognizer) { SerializationUtils.addCommonRecognizerResultData(jsonResult, result); jsonResult.put("cardNumber", result.getCardNumber()); jsonResult.put("cvv", result.getCvv()); - jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); - jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); jsonResult.put("documentDataMatch", SerializationUtils.serializeEnum(result.getDocumentDataMatch())); jsonResult.put("fullDocumentBackImage", SerializationUtils.encodeImageBase64(result.getFullDocumentBackImage())); jsonResult.put("fullDocumentFrontImage", SerializationUtils.encodeImageBase64(result.getFullDocumentFrontImage())); diff --git a/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCBlinkCardRecognizerWrapper.m b/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCBlinkCardRecognizerWrapper.m index 7d4ee92..4bbc2d7 100644 --- a/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCBlinkCardRecognizerWrapper.m +++ b/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCBlinkCardRecognizerWrapper.m @@ -86,13 +86,6 @@ -(MBCRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } return recognizer; @@ -111,8 +104,6 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:self.result.cardNumberPrefix forKey:@"cardNumberPrefix"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.cardNumberValid] forKey:@"cardNumberValid"]; [jsonResult setValue:self.result.cvv forKey:@"cvv"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; [jsonResult setValue:[MBCSerializationUtils serializeMBDateResult:self.result.expiryDate] forKey:@"expiryDate"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.firstSideBlurred] forKey:@"firstSideBlurred"]; [jsonResult setValue:[MBCSerializationUtils encodeMBImage:self.result.firstSideFullDocumentImage] forKey:@"firstSideFullDocumentImage"]; diff --git a/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardEliteRecognizerWrapper.m b/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardEliteRecognizerWrapper.m index 57859e6..5d30233 100644 --- a/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardEliteRecognizerWrapper.m +++ b/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardEliteRecognizerWrapper.m @@ -86,13 +86,6 @@ -(MBCRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } return recognizer; @@ -109,8 +102,6 @@ -(NSDictionary *) serializeResult { NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; [jsonResult setValue:self.result.cardNumber forKey:@"cardNumber"]; [jsonResult setValue:self.result.cvv forKey:@"cvv"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; [jsonResult setValue:[NSNumber numberWithInteger:(self.result.documentDataMatch)] forKey:@"documentDataMatch"]; [jsonResult setValue:[MBCSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; [jsonResult setValue:[MBCSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; diff --git a/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardRecognizerWrapper.m b/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardRecognizerWrapper.m index d614c6d..6bf3f52 100644 --- a/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardRecognizerWrapper.m +++ b/BlinkCard/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBCLegacyBlinkCardRecognizerWrapper.m @@ -107,13 +107,6 @@ -(MBCRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; } - } - { - id signResult = [jsonRecognizer valueForKey:@"signResult"]; - if (signResult != nil) { - recognizer.signResult = [(NSNumber *)signResult boolValue]; - } - } return recognizer; @@ -130,8 +123,6 @@ -(NSDictionary *) serializeResult { NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; [jsonResult setValue:self.result.cardNumber forKey:@"cardNumber"]; [jsonResult setValue:self.result.cvv forKey:@"cvv"]; - [jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"]; - [jsonResult setValue:[NSNumber numberWithInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"]; [jsonResult setValue:[NSNumber numberWithInteger:(self.result.documentDataMatch)] forKey:@"documentDataMatch"]; [jsonResult setValue:[MBCSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"]; [jsonResult setValue:[MBCSerializationUtils encodeMBImage:self.result.fullDocumentFrontImage] forKey:@"fullDocumentFrontImage"]; diff --git a/BlinkCard/ios/blinkcard_flutter.podspec b/BlinkCard/ios/blinkcard_flutter.podspec index f2fa00c..dd8aecf 100644 --- a/BlinkCard/ios/blinkcard_flutter.podspec +++ b/BlinkCard/ios/blinkcard_flutter.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'blinkcard_flutter' - s.version = '2.4.2' + s.version = '2.6.0' s.summary = 'Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards.' s.description = <<-DESC Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards. @@ -16,9 +16,9 @@ Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards. s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.platform = :ios, '9.0' + s.platform = :ios, '12.0' - s.dependency 'MBBlinkCard', '~> 2.4.0' + s.dependency 'MBBlinkCard', '~> 2.6.0' # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } diff --git a/BlinkCard/lib/overlay_settings.dart b/BlinkCard/lib/overlay_settings.dart index 4f28ef3..8f96457 100644 --- a/BlinkCard/lib/overlay_settings.dart +++ b/BlinkCard/lib/overlay_settings.dart @@ -28,6 +28,5 @@ class OverlaySettings { OverlaySettings(this.overlaySettingsType); factory OverlaySettings.fromJson(Map json) => _$OverlaySettingsFromJson(json); - Map toJson() => _$OverlaySettingsToJson(this); } \ No newline at end of file diff --git a/BlinkCard/lib/overlays/blinkcard_overlays.dart b/BlinkCard/lib/overlays/blinkcard_overlays.dart index 0578236..fc4705f 100644 --- a/BlinkCard/lib/overlays/blinkcard_overlays.dart +++ b/BlinkCard/lib/overlays/blinkcard_overlays.dart @@ -7,23 +7,24 @@ part 'blinkcard_overlays.g.dart'; /// BlinkCard overlay is best suited for scanning payment cards. @JsonSerializable() class BlinkCardOverlaySettings extends OverlaySettings { - /// String: user instructions that are shown above camera preview while the first side of the - /// document is being scanned. - /// If null, default value will be used. - String? firstSideInstructions; + /// String: user instructions that are shown above camera preview while the first side of the + /// document is being scanned. + /// If null, default value will be used. + String? firstSideInstructions; - /// String: user instructions that are shown above camera preview while the second side of the - /// document is being scanned. - /// If null, default value will be used. - String? flipCardInstructions; + /// String: user instructions that are shown above camera preview while the second side of the + /// document is being scanned. + /// If null, default value will be used. + String? flipCardInstructions; - /// Defines whether glare warning will be displayed when user turn on a flashlight - /// Default true - bool showFlashlightWarning = true; + /// Defines whether glare warning will be displayed when user turn on a flashlight + /// Default true + bool showFlashlightWarning = true; - BlinkCardOverlaySettings(): super('BlinkCardOverlaySettings'); + BlinkCardOverlaySettings() : super('BlinkCardOverlaySettings'); - factory BlinkCardOverlaySettings.fromJson(Map json) => _$BlinkCardOverlaySettingsFromJson(json); + factory BlinkCardOverlaySettings.fromJson(Map json) => + _$BlinkCardOverlaySettingsFromJson(json); - Map toJson() => _$BlinkCardOverlaySettingsToJson(this); + Map toJson() => _$BlinkCardOverlaySettingsToJson(this); } diff --git a/BlinkCard/lib/recognizer.dart b/BlinkCard/lib/recognizer.dart index c1ecb33..62f21d8 100644 --- a/BlinkCard/lib/recognizer.dart +++ b/BlinkCard/lib/recognizer.dart @@ -22,7 +22,6 @@ class Recognizer { } factory Recognizer.fromJson(Map json) => _$RecognizerFromJson(json); - Map toJson() => _$RecognizerToJson(this); } @@ -48,7 +47,6 @@ class RecognizerResult { RecognizerResult(this.resultState); factory RecognizerResult.fromJson(Map json) => _$RecognizerResultFromJson(json); - Map toJson() => _$RecognizerResultToJson(this); } @@ -64,6 +62,5 @@ class RecognizerCollection { RecognizerCollection(this.recognizerArray); factory RecognizerCollection.fromJson(Map json) => _$RecognizerCollectionFromJson(json); - Map toJson() => _$RecognizerCollectionToJson(this); } \ No newline at end of file diff --git a/BlinkCard/lib/recognizers/blink_card_recognizer.dart b/BlinkCard/lib/recognizers/blink_card_recognizer.dart index a955179..0de84a8 100644 --- a/BlinkCard/lib/recognizers/blink_card_recognizer.dart +++ b/BlinkCard/lib/recognizers/blink_card_recognizer.dart @@ -19,12 +19,6 @@ class BlinkCardRecognizerResult extends RecognizerResult { /// Payment card's security code/value. String? cvv; - ///Digital signature of the recognition result. Available only if enabled with signResult property. - String? digitalSignature; - - ///Version of the digital signature. Available only if enabled with signResult property. - int? digitalSignatureVersion; - ///The payment card's expiry date. Date? expiryDate; @@ -66,10 +60,6 @@ class BlinkCardRecognizerResult extends RecognizerResult { this.cvv = nativeResult["cvv"]; - this.digitalSignature = nativeResult["digitalSignature"]; - - this.digitalSignatureVersion = nativeResult["digitalSignatureVersion"]; - this.expiryDate = nativeResult["expiryDate"] != null ? Date(Map.from(nativeResult["expiryDate"])) : null; this.firstSideBlurred = nativeResult["firstSideBlurred"]; @@ -152,11 +142,6 @@ class BlinkCardRecognizer extends Recognizer { /// bool returnFullDocumentImage = false; - ///Whether or not recognition result should be signed. - /// - /// - bool signResult = false; - BlinkCardRecognizer(): super('BlinkCardRecognizer'); RecognizerResult createResultFromNative(Map nativeResult) { @@ -164,6 +149,5 @@ class BlinkCardRecognizer extends Recognizer { } factory BlinkCardRecognizer.fromJson(Map json) => _$BlinkCardRecognizerFromJson(json); - Map toJson() => _$BlinkCardRecognizerToJson(this); } \ No newline at end of file diff --git a/BlinkCard/lib/recognizers/blink_card_recognizer.g.dart b/BlinkCard/lib/recognizers/blink_card_recognizer.g.dart index d85fb41..7f7f3bc 100644 --- a/BlinkCard/lib/recognizers/blink_card_recognizer.g.dart +++ b/BlinkCard/lib/recognizers/blink_card_recognizer.g.dart @@ -20,8 +20,7 @@ BlinkCardRecognizer _$BlinkCardRecognizerFromJson(Map json) { ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) ..paddingEdge = (json['paddingEdge'] as num).toDouble() - ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool - ..signResult = json['signResult'] as bool; + ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool; } Map _$BlinkCardRecognizerToJson( @@ -39,5 +38,4 @@ Map _$BlinkCardRecognizerToJson( instance.fullDocumentImageExtensionFactors, 'paddingEdge': instance.paddingEdge, 'returnFullDocumentImage': instance.returnFullDocumentImage, - 'signResult': instance.signResult, }; diff --git a/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.dart b/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.dart index e142769..01f3161 100644 --- a/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.dart +++ b/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.dart @@ -13,12 +13,6 @@ class LegacyBlinkCardEliteRecognizerResult extends RecognizerResult { /// Payment card's security code/value String? cvv; - ///Digital signature of the recognition result. Available only if enabled with signResult property. - String? digitalSignature; - - ///Version of the digital signature. Available only if enabled with signResult property. - int? digitalSignatureVersion; - ///Returns CDataMatchResultSuccess if data from scanned parts/sides of the document match, /// CDataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side /// of the document and values do not match, this method will return CDataMatchResultFailed. Result will @@ -50,10 +44,6 @@ class LegacyBlinkCardEliteRecognizerResult extends RecognizerResult { this.cvv = nativeResult["cvv"]; - this.digitalSignature = nativeResult["digitalSignature"]; - - this.digitalSignatureVersion = nativeResult["digitalSignatureVersion"]; - this.documentDataMatch = DataMatchResult.values[nativeResult["documentDataMatch"]]; this.fullDocumentBackImage = nativeResult["fullDocumentBackImage"]; @@ -128,11 +118,6 @@ class LegacyBlinkCardEliteRecognizer extends Recognizer { /// bool returnFullDocumentImage = false; - ///Whether or not recognition result should be signed. - /// - /// - bool signResult = false; - LegacyBlinkCardEliteRecognizer(): super('LegacyBlinkCardEliteRecognizer'); RecognizerResult createResultFromNative(Map nativeResult) { @@ -140,6 +125,5 @@ class LegacyBlinkCardEliteRecognizer extends Recognizer { } factory LegacyBlinkCardEliteRecognizer.fromJson(Map json) => _$LegacyBlinkCardEliteRecognizerFromJson(json); - Map toJson() => _$LegacyBlinkCardEliteRecognizerToJson(this); } \ No newline at end of file diff --git a/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.g.dart b/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.g.dart index 5a84df2..2f2a60c 100644 --- a/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.g.dart +++ b/BlinkCard/lib/recognizers/legacy_blink_card_elite_recognizer.g.dart @@ -20,8 +20,7 @@ LegacyBlinkCardEliteRecognizer _$LegacyBlinkCardEliteRecognizerFromJson( ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) - ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool - ..signResult = json['signResult'] as bool; + ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool; } Map _$LegacyBlinkCardEliteRecognizerToJson( @@ -39,5 +38,4 @@ Map _$LegacyBlinkCardEliteRecognizerToJson( 'fullDocumentImageExtensionFactors': instance.fullDocumentImageExtensionFactors, 'returnFullDocumentImage': instance.returnFullDocumentImage, - 'signResult': instance.signResult, }; diff --git a/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.dart b/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.dart index b86bba5..fcbb652 100644 --- a/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.dart +++ b/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.dart @@ -13,12 +13,6 @@ class LegacyBlinkCardRecognizerResult extends RecognizerResult { /// Payment card's security code/value String? cvv; - ///Digital signature of the recognition result. Available only if enabled with signResult property. - String? digitalSignature; - - ///Version of the digital signature. Available only if enabled with signResult property. - int? digitalSignatureVersion; - ///Returns CDataMatchResultSuccess if data from scanned parts/sides of the document match, /// CDataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side /// of the document and values do not match, this method will return CDataMatchResultFailed. Result will @@ -56,10 +50,6 @@ class LegacyBlinkCardRecognizerResult extends RecognizerResult { this.cvv = nativeResult["cvv"]; - this.digitalSignature = nativeResult["digitalSignature"]; - - this.digitalSignatureVersion = nativeResult["digitalSignatureVersion"]; - this.documentDataMatch = DataMatchResult.values[nativeResult["documentDataMatch"]]; this.fullDocumentBackImage = nativeResult["fullDocumentBackImage"]; @@ -153,11 +143,6 @@ class LegacyBlinkCardRecognizer extends Recognizer { /// bool returnFullDocumentImage = false; - ///Whether or not recognition result should be signed. - /// - /// - bool signResult = false; - LegacyBlinkCardRecognizer(): super('LegacyBlinkCardRecognizer'); RecognizerResult createResultFromNative(Map nativeResult) { @@ -165,6 +150,5 @@ class LegacyBlinkCardRecognizer extends Recognizer { } factory LegacyBlinkCardRecognizer.fromJson(Map json) => _$LegacyBlinkCardRecognizerFromJson(json); - Map toJson() => _$LegacyBlinkCardRecognizerToJson(this); } \ No newline at end of file diff --git a/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.g.dart b/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.g.dart index 81bb851..50fad52 100644 --- a/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.g.dart +++ b/BlinkCard/lib/recognizers/legacy_blink_card_recognizer.g.dart @@ -23,8 +23,7 @@ LegacyBlinkCardRecognizer _$LegacyBlinkCardRecognizerFromJson( ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) - ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool - ..signResult = json['signResult'] as bool; + ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool; } Map _$LegacyBlinkCardRecognizerToJson( @@ -45,5 +44,4 @@ Map _$LegacyBlinkCardRecognizerToJson( 'fullDocumentImageExtensionFactors': instance.fullDocumentImageExtensionFactors, 'returnFullDocumentImage': instance.returnFullDocumentImage, - 'signResult': instance.signResult, }; diff --git a/BlinkCard/lib/recognizers/success_frame_grabber_recognizer.dart b/BlinkCard/lib/recognizers/success_frame_grabber_recognizer.dart index e6f2851..1908662 100644 --- a/BlinkCard/lib/recognizers/success_frame_grabber_recognizer.dart +++ b/BlinkCard/lib/recognizers/success_frame_grabber_recognizer.dart @@ -5,39 +5,41 @@ part 'success_frame_grabber_recognizer.g.dart'; /// Result object for SuccessFrameGrabberRecognizer. class SuccessFrameGrabberRecognizerResult extends RecognizerResult { - - /// Camera frame at the time slave recognizer finished recognition - String? successFrame; - - /// RecognizerResult of the slave recognizer - RecognizerResult slaveRecognizerResult; - - SuccessFrameGrabberRecognizerResult(Map nativeResult, this.slaveRecognizerResult): super(RecognizerResultState.values[nativeResult['resultState']]) { - - /// Camera frame at the time slave recognizer finished recognition - this.successFrame = nativeResult['successFrame']; - } + /// Camera frame at the time slave recognizer finished recognition + String? successFrame; + + /// RecognizerResult of the slave recognizer + RecognizerResult slaveRecognizerResult; + + SuccessFrameGrabberRecognizerResult( + Map nativeResult, this.slaveRecognizerResult) + : super(RecognizerResultState.values[nativeResult['resultState']]) { + /// Camera frame at the time slave recognizer finished recognition + this.successFrame = nativeResult['successFrame']; + } } /// SuccessFrameGrabberRecognizer can wrap any other recognizer and obtain camera /// frame on which the other recognizer finished recognition. @JsonSerializable() class SuccessFrameGrabberRecognizer extends Recognizer { + Recognizer slaveRecognizer; - Recognizer slaveRecognizer; - - SuccessFrameGrabberRecognizer(this.slaveRecognizer): super('SuccessFrameGrabberRecognizer') { - - if (!(this.slaveRecognizer is Recognizer)) { - throw Exception("Slave recognizer must be Recognizer!"); - } - } - - RecognizerResult createResultFromNative(Map nativeResult) { - return SuccessFrameGrabberRecognizerResult(nativeResult, this.slaveRecognizer.createResultFromNative(Map.from(nativeResult['slaveRecognizerResult']))); + SuccessFrameGrabberRecognizer(this.slaveRecognizer) + : super('SuccessFrameGrabberRecognizer') { + if (!(this.slaveRecognizer is Recognizer)) { + throw Exception("Slave recognizer must be Recognizer!"); } - - factory SuccessFrameGrabberRecognizer.fromJson(Map json) => _$SuccessFrameGrabberRecognizerFromJson(json); - - Map toJson() => _$SuccessFrameGrabberRecognizerToJson(this); + } + + RecognizerResult createResultFromNative(Map nativeResult) { + return SuccessFrameGrabberRecognizerResult( + nativeResult, + this.slaveRecognizer.createResultFromNative( + Map.from(nativeResult['slaveRecognizerResult']))); + } + + factory SuccessFrameGrabberRecognizer.fromJson(Map json) => + _$SuccessFrameGrabberRecognizerFromJson(json); + Map toJson() => _$SuccessFrameGrabberRecognizerToJson(this); } diff --git a/BlinkCard/lib/types.dart b/BlinkCard/lib/types.dart index 32733e9..4ec7dbf 100644 --- a/BlinkCard/lib/types.dart +++ b/BlinkCard/lib/types.dart @@ -187,7 +187,6 @@ class CardNumberAnonymizationSettings { CardNumberAnonymizationSettings(); factory CardNumberAnonymizationSettings.fromJson(Map json) => _$CardNumberAnonymizationSettingsFromJson(json); - Map toJson() => _$CardNumberAnonymizationSettingsToJson(this); } @@ -209,7 +208,6 @@ class BlinkCardAnonymizationSettings { BlinkCardAnonymizationSettings(); factory BlinkCardAnonymizationSettings.fromJson(Map json) => _$BlinkCardAnonymizationSettingsFromJson(json); - Map toJson() => _$BlinkCardAnonymizationSettingsToJson(this); } @@ -232,7 +230,6 @@ class ImageExtensionFactors { ImageExtensionFactors(); factory ImageExtensionFactors.fromJson(Map json) => _$ImageExtensionFactorsFromJson(json); - Map toJson() => _$ImageExtensionFactorsToJson(this); } diff --git a/BlinkCard/pubspec.yaml b/BlinkCard/pubspec.yaml index cf046b1..bd3cebf 100644 --- a/BlinkCard/pubspec.yaml +++ b/BlinkCard/pubspec.yaml @@ -1,6 +1,6 @@ name: blinkcard_flutter description: Flutter plugin for BlinkCard, SDK for scanning and OCR of various credit cards. -version: 2.4.2 +version: 2.6.0 author: Microblink homepage: https://microblink.com @@ -34,4 +34,4 @@ flutter: package: com.microblink.blinkcard.flutter pluginClass: MicroblinkFlutterPlugin ios: - pluginClass: MicroblinkFlutterPlugin \ No newline at end of file + pluginClass: BlinkCardFlutterPlugin diff --git a/Release notes.md b/Release notes.md index 0c1db33..4d24eee 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,7 @@ +## 2.6.0 + +- Updated to [Android SDK v2.6.0](https://github.com/BlinkCard/blinkcard-android/releases/tag/v2.6.0) and [iOS SDK v2.6.0](https://github.com/BlinkCard/blinkcard-ios/releases/tag/v2.6.0) + ## 2.4.2 - Hotfix - change channel name diff --git a/initFlutterSample.sh b/initFlutterSample.sh index 23487f7..3d77f1c 100755 --- a/initFlutterSample.sh +++ b/initFlutterSample.sh @@ -32,6 +32,9 @@ popd # enter into ios project folder pushd ios +#Force minimal iOS version +sed -i '' "s/# platform :ios, '9.0'/platform :ios, '12.0'/" Podfile + # install pod pod install @@ -52,6 +55,11 @@ popd cp ../sample_files/main.dart lib/ +#update compile and target sdk versions to 31, add android:exported="true" to manifest +sed -i '' 's#compileSdkVersion 30#compileSdkVersion 31#g' ./android/app/build.gradle +sed -i '' 's#targetSdkVersion 30#targetSdkVersion 31#g' ./android/app/build.gradle +sed -i '' 's#android:name=".MainActivity"#android:name=".MainActivity" android:exported="true"#g' ./android/app/src/main/AndroidManifest.xml + echo "" echo "Go to Flutter project folder: cd $appName" echo "To run on Android type: flutter run" diff --git a/sample_files/main.dart b/sample_files/main.dart index e5ad8c4..ed9fd4b 100644 --- a/sample_files/main.dart +++ b/sample_files/main.dart @@ -20,9 +20,9 @@ class _MyAppState extends State { Future scan() async { String license; if (Theme.of(context).platform == TargetPlatform.iOS) { - license = "sRwAAAEVY29tLm1pY3JvYmxpbmsuc2FtcGxl1BIcP6dpSuS/37rVPvGgnEXtW6n0WYNXlN/0i1f88yoVpcC6wVI7C9/PwW96iHudfFxZtXdYuU3G3FGWKgCcqkSdZwRtiHrFeYz8beVEwPAGbLMPGidJ8qm5ZtgfLYHJ5NqR0qfIfqKTIDlsGzUY2D2qp3KUfYcscbf9JftuQdMpQ8VfQ8eu0+x1aUckcowsgAfq8/CTF3cpaSF1mBKMCO+idtTRWI8B52aZZDeybQ=="; + license = "sRwAAAEVY29tLm1pY3JvYmxpbmsuc2FtcGxl1BIcP6dpSuS/37rVPPmJM1WVgUPxJ6drb0RlV8e0cdQjsz2ti42it9NqPg8OAPX47u13pXjleAvZAuxN0Fr8kBeUjMM8y/GJ/4FRBIETzsuJKokzMn2HTkkeMXtep7afy/JHdc+8FKJdSEn0RJfEkxAVdvY0OV+Ozu2Zjca+ULM9jA23TXgGkRWicDTBuPbNzT2exFl7fHx6/olVSQ9zrAa/dMpIWjqfRyM22uSc5g=="; } else if (Theme.of(context).platform == TargetPlatform.android) { - license = "sRwAAAAVY29tLm1pY3JvYmxpbmsuc2FtcGxlU9kJdb5ZkGlTu623Pixsw037mGhBUOlKf9FyC46r0aJfr+2FJclONWXQv/Xlj27pDDhp07b66EWvmCZeP9oUM7zUHo17x8A4DC8nIZhxCsRgz5FLeMD7opEa+XVTb3/kxNOc8zNZ2XSG0Pw9VTxYf/74hEC7mVhYMIK+4Nf94HM5hujNJInjb5BRLBqrje6tcOlqgSDdQGBkCIre9FOLJDgVtyq41HIwC4cxSS/ryg=="; + license = "sRwAAAAVY29tLm1pY3JvYmxpbmsuc2FtcGxlU9kJdb5ZkGlTu623PARDZ2y3bw/2FMh5N8Ns88iVHtrPi9+/nWa1Jfjuaio9sNqvjMT6OtkQ6mJBjE58IcmwG5+mm6WUi+Jy6MYfmGIzIoMFQvkqfYUo2Q/WFqsbYjo57kuic4Q5BWQbqavo1wF7llPipW1ABXqrTLnoewhyHJrJCMyXSOvK6ensoeNbd2iJtgi2L6myHxmekGcmW2ZnKr9otoMUy0YqZ5AjqMxjDw=="; } else { license = ""; }