Skip to content

Commit

Permalink
Merge pull request #2 from blinkcard/test/blinkid-blinkcard-combine
Browse files Browse the repository at this point in the history
Test/blinkid blinkcard combine
  • Loading branch information
krizaa authored Sep 8, 2021
2 parents 8d5b58e + 6fe32be commit 7d417de
Show file tree
Hide file tree
Showing 33 changed files with 207 additions and 199 deletions.
2 changes: 1 addition & 1 deletion BlinkCard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microblink/blinkcard-react-native",
"version": "2.4.0",
"version": "2.4.1",
"description": "AI-driven credit card scanning for cross-platform apps built with ReactNative.",
"main": "index.js",
"repository": {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <React/RCTBridgeModule.h>

@interface MBCMicroblinkModule : NSObject<RCTBridgeModule>
@interface MBCBlinkCardModule : NSObject<RCTBridgeModule>


@end
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#import "MBOverlayViewControllerDelegate.h"
#import "MBRecognizerSerializers.h"
#import "MBOverlaySettingsSerializers.h"
#import "MBRecognizerWrapper.h"
#import "MBSerializationUtils.h"
#import "MBCOverlayViewControllerDelegate.h"
#import "MBCRecognizerSerializers.h"
#import "MBCOverlaySettingsSerializers.h"
#import "MBCRecognizerWrapper.h"
#import "MBCSerializationUtils.h"

#import <Foundation/Foundation.h>
#import "MBMicroblinkModule.h"
#import "MBCBlinkCardModule.h"
#import <React/RCTConvert.h>
#import <BlinkCard/BlinkCard.h>

Expand All @@ -15,25 +15,24 @@ typedef NS_ENUM(NSUInteger, PPImageType) {
PPImageTypeSuccessful,
};

@interface MBCMicroblinkModule () <MBCOverlayViewControllerDelegate>
// NSError Domain
static NSString* const MBCErrorDomain = @"microblink.error";
static NSString* const RESULT_CAPTURED_FULL_IMAGE = @"capturedFullImage";
static NSString* const RESULT_DOCUMENT_CAPTURE_RECOGNIZER_RESULT = @"documentCaptureRecognizerResult";

@interface MBCBlinkCardModule () <MBCOverlayViewControllerDelegate>

@property (nonatomic, strong) MBCRecognizerCollection *recognizerCollection;
@property (nonatomic) id<MBCRecognizerRunnerViewController> scanningViewController;

@property (class, nonatomic, readonly) NSString *STATUS_SCAN_CANCELED;

@property (nonatomic, strong) RCTPromiseResolveBlock promiseResolve;
@property (nonatomic, strong) RCTPromiseRejectBlock promiseReject;

@end

// promise reject message codes
static NSString* const kErrorLicenseKeyDoesNotExists = @"ERROR_LICENSE_KEY_DOES_NOT_EXISTS";
static NSString* const kErrorCoordniatorDoesNotExists = @"COORDINATOR_DOES_NOT_EXISTS";
static NSString* const kStatusScanCanceled = @"STATUS_SCAN_CANCELED";

// NSError Domain
static NSString* const MBCErrorDomain = @"microblink.error";

@implementation MBCMicroblinkModule
@implementation MBCBlinkCardModule

RCT_EXPORT_MODULE(BlinkCardIos);

Expand Down Expand Up @@ -137,10 +136,14 @@ - (void)overlayDidTapClose:(MBCOverlayViewController *)overlayViewController {
NSError *error = [NSError errorWithDomain:MBCErrorDomain
code:-58
userInfo:nil];
self.promiseReject(kStatusScanCanceled, @"Scanning has been canceled", error);
self.promiseReject(MBCBlinkCardModule.STATUS_SCAN_CANCELED, @"Scanning has been canceled", error);

self.promiseResolve = nil;
self.promiseReject = nil;
}

+ (NSString *)STATUS_SCAN_CANCELED {
return @"STATUS_SCAN_CANCELED";
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Created by DoDo on 04/06/2018.
//

#import "MBBlinkCardSerializationUtils.h"
#import "MBSerializationUtils.h"
#import "MBCBlinkCardSerializationUtils.h"
#import "MBCSerializationUtils.h"

@implementation MBCBlinkCardSerializationUtils

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Created by DoDo on 04/06/2018.
//

#import "MBCommonSerializationUtils.h"
#import "MBSerializationUtils.h"
#import "MBCCommonSerializationUtils.h"
#import "MBCSerializationUtils.h"

@implementation MBCCommonSerializationUtils

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by DoDo on 01/06/2018.
//

#import "MBSerializationUtils.h"
#import "MBCSerializationUtils.h"

@implementation MBCSerializationUtils

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2018 Jura Skrlec. All rights reserved.
//

#import "MBOverlaySerializationUtils.h"
#import "MBCOverlaySerializationUtils.h"

@implementation MBCOverlaySerializationUtils

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by DoDo on 04/06/2018.
//

#import "MBOverlayViewControllerDelegate.h"
#import "MBCOverlayViewControllerDelegate.h"

#import <BlinkCard/BlinkCard.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// Created by DoDo on 04/06/2018.
//

#import "MBOverlaySettingsSerializers.h"
#import "MBCOverlaySettingsSerializers.h"

#import "MBOverlayVCCreator.h"
#import "MBBlinkCardOverlaySettingsSerialization.h"
#import "MBCOverlayVCCreator.h"
#import "MBCBlinkCardOverlaySettingsSerialization.h"

@interface MBCOverlaySettingsSerializers ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#import "MBOverlayViewControllerDelegate.h"
#import "MBCOverlayViewControllerDelegate.h"

#import <BlinkCard/BlinkCard.h>
#import <Foundation/Foundation.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by DoDo on 04/06/2018.
//

#import "MBOverlayVCCreator.h"
#import "MBCOverlayVCCreator.h"

#import <Foundation/Foundation.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Created by DoDo on 04/06/2018.
//

#import "MBBlinkCardOverlaySettingsSerialization.h"
#import "MBOverlaySerializationUtils.h"
#import "MBCBlinkCardOverlaySettingsSerialization.h"
#import "MBCOverlaySerializationUtils.h"

@interface MBCBlinkCardOverlaySettingsSerialization ()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "MBRecognizerWrapper.h"
#import "MBCRecognizerWrapper.h"

#import <BlinkCard/BlinkCard.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#import "MBRecognizerSerializers.h"
#import "MBCRecognizerSerializers.h"

#import "MBRecognizerWrapper.h"
#import "MBSuccessFrameGrabberRecognizerWrapper.h"
#import "MBBlinkCardRecognizerWrapper.h"
#import "MBLegacyBlinkCardEliteRecognizerWrapper.h"
#import "MBLegacyBlinkCardRecognizerWrapper.h"
#import "MBCRecognizerWrapper.h"
#import "MBCSuccessFrameGrabberRecognizerWrapper.h"
#import "MBCBlinkCardRecognizerWrapper.h"
#import "MBCLegacyBlinkCardEliteRecognizerWrapper.h"
#import "MBCLegacyBlinkCardRecognizerWrapper.h"
//

@interface MBCRecognizerSerializers ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by DoDo on 01/06/2018.
//

#import "MBRecognizerWrapper.h"
#import "MBCRecognizerWrapper.h"
#import <Foundation/Foundation.h>

@implementation MBCRecognizer (JsonSerialization)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "MBRecognizerWrapper.h"
#import "MBCRecognizerWrapper.h"
#import <BlinkCard/BlinkCard.h>

@interface MBCBlinkCardRecognizerCreator : NSObject<MBCRecognizerCreator>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "MBBlinkCardRecognizerWrapper.h"
#import "MBSerializationUtils.h"
#import "MBBlinkCardSerializationUtils.h"
#import "MBCommonSerializationUtils.h"
#import "MBCBlinkCardRecognizerWrapper.h"
#import "MBCSerializationUtils.h"
#import "MBCBlinkCardSerializationUtils.h"
#import "MBCCommonSerializationUtils.h"

@implementation MBCBlinkCardRecognizerCreator

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "MBRecognizerWrapper.h"
#import "MBCRecognizerWrapper.h"
#import <BlinkCard/BlinkCard.h>

@interface MBCLegacyBlinkCardEliteRecognizerCreator : NSObject<MBCRecognizerCreator>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "MBLegacyBlinkCardEliteRecognizerWrapper.h"
#import "MBSerializationUtils.h"
#import "MBBlinkCardSerializationUtils.h"
#import "MBCommonSerializationUtils.h"
#import "MBCLegacyBlinkCardEliteRecognizerWrapper.h"
#import "MBCSerializationUtils.h"
#import "MBCBlinkCardSerializationUtils.h"
#import "MBCCommonSerializationUtils.h"

@implementation MBCLegacyBlinkCardEliteRecognizerCreator

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "MBRecognizerWrapper.h"
#import "MBCRecognizerWrapper.h"
#import <BlinkCard/BlinkCard.h>

@interface MBCLegacyBlinkCardRecognizerCreator : NSObject<MBCRecognizerCreator>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "MBLegacyBlinkCardRecognizerWrapper.h"
#import "MBSerializationUtils.h"
#import "MBBlinkCardSerializationUtils.h"
#import "MBCommonSerializationUtils.h"
#import "MBCLegacyBlinkCardRecognizerWrapper.h"
#import "MBCSerializationUtils.h"
#import "MBCBlinkCardSerializationUtils.h"
#import "MBCCommonSerializationUtils.h"

@implementation MBCLegacyBlinkCardRecognizerCreator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2018 Jura Skrlec. All rights reserved.
//

#import "MBRecognizerWrapper.h"
#import "MBCRecognizerWrapper.h"
#import <BlinkCard/BlinkCard.h>

@interface MBCSuccessFrameGrabberRecognizerCreator : NSObject<MBCRecognizerCreator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// Copyright © 2018 Jura Skrlec. All rights reserved.
//

#import "MBSuccessFrameGrabberRecognizerWrapper.h"
#import "MBCSuccessFrameGrabberRecognizerWrapper.h"

#import "MBRecognizerSerializers.h"
#import "MBSerializationUtils.h"
#import "MBCRecognizerSerializers.h"
#import "MBCSerializationUtils.h"

@implementation MBCSuccessFrameGrabberRecognizerCreator

Expand Down
5 changes: 5 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.4.1

- Changes to allow combining BlinkCard with other SDKs.


## 2.4.0

- Updated to [Android SDK v2.4.0](https://github.com/BlinkCard/blinkcard-android/releases/tag/v2.4.0) and [iOS SDK v2.4.0](https://github.com/BlinkCard/blinkcard-ios/releases/tag/v2.4.0)
Expand Down
2 changes: 1 addition & 1 deletion initReactNativeSampleApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ "$IS_LOCAL_BUILD" = true ]; then
# use directly source code from this repo instead of npm package
# from RN 0.57 symlink does not work any more
npm pack $blink_card_plugin_path
npm install --save microblink-blinkcard-react-native-2.4.0.tgz
npm install --save microblink-blinkcard-react-native-2.4.1.tgz
#pushd node_modules
#ln -s $blinkcard_plugin_path blinkcard-react-native
#popd
Expand Down
2 changes: 1 addition & 1 deletion sample_files/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ const styles = StyleSheet.create({
},
});

AppRegistry.registerComponent('Sample', () => Sample);
AppRegistry.registerComponent('Sample', () => Sample);

0 comments on commit 7d417de

Please sign in to comment.