Skip to content

Commit

Permalink
[iOS] Updated bindings for v4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
juraskrlec committed Aug 14, 2018
1 parent f6bbd0c commit 02e4889
Show file tree
Hide file tree
Showing 21 changed files with 3,868 additions and 1,472 deletions.
10 changes: 10 additions & 0 deletions BlinkID/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,12 @@
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyOldIdRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBEudlRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBPdf417RecognizerWrapper.h" />
Expand All @@ -193,10 +195,12 @@
<header-file src="src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBDocumentFaceRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBIkadRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.h" />
Expand Down Expand Up @@ -231,13 +235,16 @@
<header-file src="src/ios/sources/Recognizers/Wrappers/MBAustriaCombinedRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBMyTenteraRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBMyKadFrontRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyOldIdRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSingaporeDlFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdBackRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSimNumberRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSingaporeChangiEmployeeIdRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBColombiaIdFrontRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.m" />
Expand All @@ -249,10 +256,12 @@
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSingaporeIdFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSwitzerlandDlFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBIkadRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBUnitedArabEmiratesIdFrontRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBAustriaPassportRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyPassportRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBMoroccoIdFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBCroatiaCombinedRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBDocumentFaceRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBJordanCombinedRecognizerWrapper.h" />
Expand Down Expand Up @@ -284,6 +293,7 @@
<source-file src="src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBMyKadFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSloveniaIdBackRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBMyTenteraRecognizerWrapper.m" />
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/scripts/initIOSFramework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
HERE="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")"
pushd ${HERE}/../src/ios/ > /dev/null

LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v4.0.1/blinkid-ios_v4.0.1.zip'
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v4.1.0/blinkid-ios_v4.1.0.zip'
FILENAME='blinkid-ios.zip'

# check if Microblink framework and bundle already exist
Expand Down
10 changes: 10 additions & 0 deletions BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#import "MBJordanIdBackRecognizerWrapper.h"
#import "MBJordanIdFrontRecognizerWrapper.h"
#import "MBMalaysiaDlFrontRecognizerWrapper.h"
#import "MBMoroccoIdBackRecognizerWrapper.h"
#import "MBMoroccoIdFrontRecognizerWrapper.h"
#import "MBMrtdCombinedRecognizerWrapper.h"
#import "MBMrtdRecognizerWrapper.h"
#import "MBMyKadBackRecognizerWrapper.h"
Expand All @@ -47,7 +49,9 @@
#import "MBSerbiaIdBackRecognizerWrapper.h"
#import "MBSerbiaIdFrontRecognizerWrapper.h"
#import "MBSimNumberRecognizerWrapper.h"
#import "MBSingaporeChangiEmployeeIdRecognizerWrapper.h"
#import "MBSingaporeCombinedRecognizerWrapper.h"
#import "MBSingaporeDlFrontRecognizerWrapper.h"
#import "MBSingaporeIdBackRecognizerWrapper.h"
#import "MBSingaporeIdFrontRecognizerWrapper.h"
#import "MBSlovakiaCombinedRecognizerWrapper.h"
Expand All @@ -57,6 +61,7 @@
#import "MBSloveniaIdBackRecognizerWrapper.h"
#import "MBSloveniaIdFrontRecognizerWrapper.h"
#import "MBSwedenDlFrontRecognizerWrapper.h"
#import "MBSwitzerlandDlFrontRecognizerWrapper.h"
#import "MBSwitzerlandIdBackRecognizerWrapper.h"
#import "MBSwitzerlandIdFrontRecognizerWrapper.h"
#import "MBSwitzerlandPassportRecognizerWrapper.h"
Expand Down Expand Up @@ -114,6 +119,8 @@ - (instancetype)init {
[self registerCreator:[[MBJordanIdBackRecognizerCreator alloc] init]];
[self registerCreator:[[MBJordanIdFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBMalaysiaDlFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBMoroccoIdBackRecognizerCreator alloc] init]];
[self registerCreator:[[MBMoroccoIdFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBMrtdCombinedRecognizerCreator alloc] init]];
[self registerCreator:[[MBMrtdRecognizerCreator alloc] init]];
[self registerCreator:[[MBMyKadBackRecognizerCreator alloc] init]];
Expand All @@ -129,7 +136,9 @@ - (instancetype)init {
[self registerCreator:[[MBSerbiaIdBackRecognizerCreator alloc] init]];
[self registerCreator:[[MBSerbiaIdFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBSimNumberRecognizerCreator alloc] init]];
[self registerCreator:[[MBSingaporeChangiEmployeeIdRecognizerCreator alloc] init]];
[self registerCreator:[[MBSingaporeCombinedRecognizerCreator alloc] init]];
[self registerCreator:[[MBSingaporeDlFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBSingaporeIdBackRecognizerCreator alloc] init]];
[self registerCreator:[[MBSingaporeIdFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBSlovakiaCombinedRecognizerCreator alloc] init]];
Expand All @@ -139,6 +148,7 @@ - (instancetype)init {
[self registerCreator:[[MBSloveniaIdBackRecognizerCreator alloc] init]];
[self registerCreator:[[MBSloveniaIdFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBSwedenDlFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBSwitzerlandDlFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBSwitzerlandIdBackRecognizerCreator alloc] init]];
[self registerCreator:[[MBSwitzerlandIdFrontRecognizerCreator alloc] init]];
[self registerCreator:[[MBSwitzerlandPassportRecognizerCreator alloc] init]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
recognizer.autoScaleDetection = [(NSNumber *)autoScaleDetection boolValue];
}
}
{
id manateeLicenseKey = [jsonRecognizer valueForKey:@"manateeLicenseKey"];
if (manateeLicenseKey != nil) {
recognizer.manateeLicenseKey = (NSString *)manateeLicenseKey;
}
}
{
id nullQuietZoneAllowed = [jsonRecognizer valueForKey:@"nullQuietZoneAllowed"];
if (nullQuietZoneAllowed != nil) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,30 @@ -(instancetype) init {

-(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
MBColombiaIdBackRecognizer *recognizer = [[MBColombiaIdBackRecognizer alloc] init];
{
id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"];
if (detectGlare != nil) {
recognizer.detectGlare = [(NSNumber *)detectGlare boolValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
}
}
{
id nullQuietZoneAllowed = [jsonRecognizer valueForKey:@"nullQuietZoneAllowed"];
if (nullQuietZoneAllowed != nil) {
recognizer.nullQuietZoneAllowed = [(NSNumber *)nullQuietZoneAllowed boolValue];
}
}
{
id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"];
if (returnFullDocumentImage != nil) {
recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue];
}
}
{
id scanUncertain = [jsonRecognizer valueForKey:@"scanUncertain"];
if (scanUncertain != nil) {
Expand All @@ -41,11 +59,12 @@ @implementation MBColombiaIdBackRecognizer (JsonSerialization)

-(NSDictionary *) serializeResult {
NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.birthDate] forKey:@"birthDate"];
[jsonResult setValue:self.result.bloodGroup forKey:@"bloodGroup"];
[jsonResult setValue:[MBSerializationUtils serializeNSDate:self.result.dateOfBirth] forKey:@"dateOfBirth"];
[jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"];
[jsonResult setValue:[self.result.fingerprint base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed] forKey:@"fingerprint"];
[jsonResult setValue:self.result.firstName forKey:@"firstName"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"];
[jsonResult setValue:self.result.lastName forKey:@"lastName"];
[jsonResult setValue:self.result.sex forKey:@"sex"];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,36 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
recognizer.extractDateOfExpiry = [(NSNumber *)extractDateOfExpiry boolValue];
}
}
{
id extractFirstName = [jsonRecognizer valueForKey:@"extractFirstName"];
if (extractFirstName != nil) {
recognizer.extractFirstName = [(NSNumber *)extractFirstName boolValue];
}
}
{
id extractLastName = [jsonRecognizer valueForKey:@"extractLastName"];
if (extractLastName != nil) {
recognizer.extractLastName = [(NSNumber *)extractLastName boolValue];
}
}
{
id extractSex = [jsonRecognizer valueForKey:@"extractSex"];
if (extractSex != nil) {
recognizer.extractSex = [(NSNumber *)extractSex boolValue];
}
}
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
}
}
{
id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"];
if (returnFaceImage != nil) {
Expand All @@ -64,6 +88,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
recognizer.returnSignatureImage = [(NSNumber *)returnSignatureImage boolValue];
}
}
{
id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"];
if (signatureImageDpi != nil) {
recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue];
}
}

return recognizer;
}
Expand All @@ -78,14 +108,14 @@ @implementation MBCroatiaIdFrontRecognizer (JsonSerialization)
-(NSDictionary *) serializeResult {
NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult];
[jsonResult setValue:self.result.citizenship forKey:@"citizenship"];
[jsonResult setValue:[MBSerializationUtils serializeNSDate:self.result.dateOfBirth] forKey:@"dateOfBirth"];
[jsonResult setValue:[MBSerializationUtils serializeNSDate:self.result.dateOfExpiry] forKey:@"dateOfExpiry"];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"];
[jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"];
[jsonResult setValue:[NSNumber numberWithBool:self.result.documentBilingual] forKey:@"documentBilingual"];
[jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"];
[jsonResult setValue:self.result.firstName forKey:@"firstName"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"];
[jsonResult setValue:self.result.identityCardNumber forKey:@"identityCardNumber"];
[jsonResult setValue:self.result.lastName forKey:@"lastName"];
[jsonResult setValue:self.result.sex forKey:@"sex"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,30 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
recognizer.extractFullName = [(NSNumber *)extractFullName boolValue];
}
}
{
id extractResidentialStatus = [jsonRecognizer valueForKey:@"extractResidentialStatus"];
if (extractResidentialStatus != nil) {
recognizer.extractResidentialStatus = [(NSNumber *)extractResidentialStatus boolValue];
}
}
{
id extractSex = [jsonRecognizer valueForKey:@"extractSex"];
if (extractSex != nil) {
recognizer.extractSex = [(NSNumber *)extractSex boolValue];
}
}
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
}
}
{
id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"];
if (returnFaceImage != nil) {
Expand All @@ -78,12 +96,13 @@ @implementation MBHongKongIdFrontRecognizer (JsonSerialization)
-(NSDictionary *) serializeResult {
NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult];
[jsonResult setValue:self.result.commercialCode forKey:@"commercialCode"];
[jsonResult setValue:[MBSerializationUtils serializeNSDate:self.result.dateOfBirth] forKey:@"dateOfBirth"];
[jsonResult setValue:[MBSerializationUtils serializeNSDate:self.result.dateOfIssue] forKey:@"dateOfIssue"];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"];
[jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"];
[jsonResult setValue:self.result.fullName forKey:@"fullName"];
[jsonResult setValue:self.result.residentialStatus forKey:@"residentialStatus"];
[jsonResult setValue:self.result.sex forKey:@"sex"];

return jsonResult;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#import "MBRecognizerWrapper.h"
#import <MicroBlink/MicroBlink.h>

@interface MBMoroccoIdBackRecognizerCreator : NSObject<MBRecognizerCreator>

@end
Loading

0 comments on commit 02e4889

Please sign in to comment.