diff --git a/CHANGELOG.md b/CHANGELOG.md index d081337ba..c48559671 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.2.0 + +- iOS updates: + - Added recognizer for Singapore ID + - Added recognizer for Austrian ID + - Added recognizer for Czech ID + +- iOS bugfixes: + - PPOcrEngineOptions are now applyed correctly when set + ## 2.1.0 - iOS updates: diff --git a/MicroBlink.framework/Headers/PPAusIDBackRecognizerResult.h b/MicroBlink.framework/Headers/PPAusIDBackRecognizerResult.h new file mode 100644 index 000000000..df4be7bcb --- /dev/null +++ b/MicroBlink.framework/Headers/PPAusIDBackRecognizerResult.h @@ -0,0 +1,58 @@ +// +// PPAusIDBackRecognizerResult.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPBlinkOcrRecognizerResult.h" + +/** + * Class representing values obtained when scanning back side of Austrian ID + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPAusIDBackRecognizerResult : PPBlinkOcrRecognizerResult + +/** + * Returns the issuing authority of the Austrian ID. + * @return issuing authority of the Austrian ID. + */ +- (NSString *)issuingAuthority; + +/** + * Returns the place of birth of the Austrian ID owner. + * @return place of birth of the Austrian ID owner. + */ +- (NSString *)placeOfBirth; + +/** + * Returns the principal residence of the Austrian ID owner. + * @return principal residence of the Austrian ID owner. + */ +- (NSString *)principalResidence; + +/** + * Returns the height of the Austrian ID owner. + * @return height of the Austrian ID owner. + */ +- (NSString *)height; + +/** + * Returns the date of issue of the Austrian ID. + * @return date of issue of the Austrian ID. + */ +- (NSString *)dateOfIssue; + +/** + * Returns the eye color of the Austrian ID owner. + * @return eye color of the Austrian ID owner. + */ +- (NSString *)eyeColor; + +/** + * Returns the document number of the Austrian ID. + * @return document number of the Austrian ID. + */ +- (NSString *)documentNumber; + +@end diff --git a/MicroBlink.framework/Headers/PPAusIDBackRecognizerSettings.h b/MicroBlink.framework/Headers/PPAusIDBackRecognizerSettings.h new file mode 100644 index 000000000..0c1f641bf --- /dev/null +++ b/MicroBlink.framework/Headers/PPAusIDBackRecognizerSettings.h @@ -0,0 +1,33 @@ +// +// PPAusIDBackRecognizerSettings.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPRecognizerSettings.h" + +/** + * Settings class for configuring Austrian Back ID Recognizer + * + * Austrian Back ID recognizer is used for scanning back side of Austrian ID. + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPAusIDBackRecognizerSettings : PPRecognizerSettings + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains full document. + * This image will be sent to scan delegate during recognition process if displaying of full document image + * is enabled via displayFullDocumentImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* FULL_DOCUMENT_IMAGE; + +/** + * Sets whether full image of ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayFullDocumentImage; + +@end diff --git a/MicroBlink.framework/Headers/PPAusIDFrontRecognizerResult.h b/MicroBlink.framework/Headers/PPAusIDFrontRecognizerResult.h new file mode 100644 index 000000000..593db8032 --- /dev/null +++ b/MicroBlink.framework/Headers/PPAusIDFrontRecognizerResult.h @@ -0,0 +1,46 @@ +// +// PPAusIDFrontRecognizerResult.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPBlinkOcrRecognizerResult.h" + +/** + * Class representing values obtained when scanning front side of Austrian ID + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPAusIDFrontRecognizerResult : PPBlinkOcrRecognizerResult + +/** + * Returns the first name of the Austrian ID owner. + * @return first name of the Austrian ID owner. + */ +- (NSString *)firstName; + +/** + * Returns the last name of the Austrian ID owner. + * @return last name of the Austrian ID owner. + */ +- (NSString *)lastName; + +/** + * Returns the document number of the Austrian ID. + * @return document number of the Austrian ID. + */ +- (NSString *)documentNumber; + +/** + * Returns the date of birth of the Austrian ID owner. + * @return date of birth of the Austrian ID owner. + */ +- (NSString *)dateOfBirth; + +/** + * Returns the sex of the Austrian ID owner. + * @return sex of the Austrian ID owner. + */ +- (NSString *)sex; + +@end diff --git a/MicroBlink.framework/Headers/PPAusIDFrontRecognizerSettings.h b/MicroBlink.framework/Headers/PPAusIDFrontRecognizerSettings.h new file mode 100644 index 000000000..f49ef572f --- /dev/null +++ b/MicroBlink.framework/Headers/PPAusIDFrontRecognizerSettings.h @@ -0,0 +1,63 @@ +// +// PPAusIDFrontRecognizerSettings.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPRecognizerSettings.h" + +/** + * Settings class for configuring Austrian Front ID Recognizer + * + * Austrian Front ID recognizer is used for scanning front side of Austrian ID. + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPAusIDFrontRecognizerSettings : PPRecognizerSettings + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains face. + * This image will be sent to scan delegate during recognition process if displaying of face image + * is enabled via displayFaceImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* ID_FACE; + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains signature. + * This image will be sent to scan delegate during recognition process if displaying of face image + * is enabled via displaySignatureImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* ID_SIGNATURE; + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains full document. + * This image will be sent to scan delegate during recognition process if displaying of full document image + * is enabled via displayFullDocumentImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* FULL_DOCUMENT_IMAGE; + +/** + * Sets whether face photo from ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayFacePhoto; + +/** + * Sets whether signature photo of ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displaySignaturePhoto; + +/** + * Sets whether full image of ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayFullDocumentImage; + +@end diff --git a/MicroBlink.framework/Headers/PPBaseOverlayViewController.h b/MicroBlink.framework/Headers/PPBaseOverlayViewController.h index c9e276c09..23d30f8fe 100644 --- a/MicroBlink.framework/Headers/PPBaseOverlayViewController.h +++ b/MicroBlink.framework/Headers/PPBaseOverlayViewController.h @@ -13,17 +13,17 @@ NS_ASSUME_NONNULL_BEGIN /** - * Common base class for PhotoPay default overlay view controllers + * Common base class for default overlay view controllers */ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBaseOverlayViewController : PPOverlayViewController /** - * Registers a subview for overlay events. + * Registers a subview for PPOverlaySubview protocol events. */ - (void)registerOverlaySubview:(UIView*)subview; /** - * Unregisters a subview for overlay events. + * Unregisters a subview for PPOverlaySubview protocol events. */ - (void)unregisterOverlaySubview:(UIView*)subview; diff --git a/MicroBlink.framework/Headers/PPBlinkIDRecognizers.h b/MicroBlink.framework/Headers/PPBlinkIDRecognizers.h index 687c937f5..13319928c 100644 --- a/MicroBlink.framework/Headers/PPBlinkIDRecognizers.h +++ b/MicroBlink.framework/Headers/PPBlinkIDRecognizers.h @@ -37,6 +37,22 @@ #import "PPCroIDBackRecognizerSettings.h" #import "PPCroIDBackRecognizerResult.h" +// Czech +#import "PPCzIDFrontRecognizerSettings.h" +#import "PPCzIDFrontRecognizerResult.h" +#import "PPCzIDBackRecognizerSettings.h" +#import "PPCzIDBackRecognizerResult.h" + +// Austria +#import "PPAusIDFrontRecognizerSettings.h" +#import "PPAusIDFrontRecognizerResult.h" +#import "PPAusIDBackRecognizerSettings.h" +#import "PPAusIDBackRecognizerResult.h" + +// Singapore +#import "PPSingaporeIDRecognizerSettings.h" +#import "PPSingaporeIDRecognizerResult.h" + // Use all recognizers from BlinkBarcode #import "PPBlinkBarcodeRecognizers.h" diff --git a/MicroBlink.framework/Headers/PPBlinkOcrRecognizerSettings.h b/MicroBlink.framework/Headers/PPBlinkOcrRecognizerSettings.h index 5421cd3da..91c5b2a85 100644 --- a/MicroBlink.framework/Headers/PPBlinkOcrRecognizerSettings.h +++ b/MicroBlink.framework/Headers/PPBlinkOcrRecognizerSettings.h @@ -43,7 +43,7 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBlinkOcrRecognizerSettings : PPTemplati @property (nonatomic) PPDetectorSettings *detectorSettings; /** - * Templating API documents will be processed twice: once regulary and second time flipped upside down. + * With this enabled, Templating API documents will be processed twice: once regulary and second time flipped upside down. * * Default: NO */ diff --git a/MicroBlink.framework/Headers/PPCoordinator.h b/MicroBlink.framework/Headers/PPCoordinator.h index 028542f52..9b35bf5a7 100644 --- a/MicroBlink.framework/Headers/PPCoordinator.h +++ b/MicroBlink.framework/Headers/PPCoordinator.h @@ -72,8 +72,10 @@ PP_CLASS_AVAILABLE_IOS(6.0) #pragma mark - Direct processing of images /** - * Processes a PPImage object using current settings. - * Results are passed to a given delegate object. + * Processes a PPImage object synchronously using current settings. + * Since this method is synchronous, calling it from a main thread will switch the call to alternate thread internally and output a warning. + * + * Results are passed a delegate object given upon a creation of PPCoordinator. * * @param image image for processing */ diff --git a/MicroBlink.framework/Headers/PPCroIDFrontRecognizerSettings.h b/MicroBlink.framework/Headers/PPCroIDFrontRecognizerSettings.h index 7ed42c304..9250f9ec6 100644 --- a/MicroBlink.framework/Headers/PPCroIDFrontRecognizerSettings.h +++ b/MicroBlink.framework/Headers/PPCroIDFrontRecognizerSettings.h @@ -24,18 +24,18 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPCroIDFrontRecognizerSettings : PPRecogn * This image will be sent to scan delegate during recognition process if displaying of face image * is enabled via displayFaceImage property and receiving of dewarpedImage in MetadataSettings is enabled. */ -@property (nonatomic, readonly) NSString* idFace; +@property (nonatomic, readonly) NSString* ID_FACE; /** * Name of the image sent to didOutputMetadata method of scanDelegate object that contains signature. * This image will be sent to scan delegate during recognition process if displaying of face image * is enabled via displaySignatureImage property and receiving of dewarpedImage in MetadataSettings is enabled. */ -@property (nonatomic, readonly) NSString* idSignature; +@property (nonatomic, readonly) NSString* ID_SIGNATURE; /** * Name of the image sent to didOutputMetadata method of scanDelegate object that contains full document. - * This image will be sent to scan delegate during recognition process if displaying of face image + * This image will be sent to scan delegate during recognition process if displaying of full document image * is enabled via displayFullDocumentImage property and receiving of dewarpedImage in MetadataSettings is enabled. */ @property (nonatomic, readonly) NSString* FULL_DOCUMENT_IMAGE; diff --git a/MicroBlink.framework/Headers/PPCzIDBackRecognizerResult.h b/MicroBlink.framework/Headers/PPCzIDBackRecognizerResult.h new file mode 100644 index 000000000..41e2e7033 --- /dev/null +++ b/MicroBlink.framework/Headers/PPCzIDBackRecognizerResult.h @@ -0,0 +1,34 @@ +// +// PPCzIDBackRecognizerResult.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPBlinkOcrRecognizerResult.h" + +/** + * Class representing values obtained when scanning back side of Czech ID + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPCzIDBackRecognizerResult : PPBlinkOcrRecognizerResult + +/** + * Returns the issuing authority of the Czech ID. + * @return issuing authority of the Czech ID. + */ +- (NSString *)authority; + +/** + * Returns the address of the Czech ID owner. + * @return address of the Czech ID owner. + */ +- (NSString *)address; + +/** + * Returns the personal number of the Czech ID owner. + * @return personal number of the Czech ID owner. + */ +- (NSString *)personalNumber; + +@end \ No newline at end of file diff --git a/MicroBlink.framework/Headers/PPCzIDBackRecognizerSettings.h b/MicroBlink.framework/Headers/PPCzIDBackRecognizerSettings.h new file mode 100644 index 000000000..335f6720c --- /dev/null +++ b/MicroBlink.framework/Headers/PPCzIDBackRecognizerSettings.h @@ -0,0 +1,33 @@ +// +// PPCzIDBackRecognizerSettings.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPRecognizerSettings.h" + +/** + * Settings class for configuring Czech Back ID Recognizer + * + * Czech Back ID recognizer is used for scanning back side of Czech ID. + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPCzIDBackRecognizerSettings : PPRecognizerSettings + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains full document. + * This image will be sent to scan delegate during recognition process if displaying of full document image + * is enabled via displayFullDocumentImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* FULL_DOCUMENT_IMAGE; + +/** + * Sets whether full image of ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayFullDocumentImage; + +@end diff --git a/MicroBlink.framework/Headers/PPCzIDFrontRecognizerResult.h b/MicroBlink.framework/Headers/PPCzIDFrontRecognizerResult.h new file mode 100644 index 000000000..0fd519eaa --- /dev/null +++ b/MicroBlink.framework/Headers/PPCzIDFrontRecognizerResult.h @@ -0,0 +1,64 @@ +// +// PPCzIDFrontRecognizerResult.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPBlinkOcrRecognizerResult.h" + +/** + * Class representing values obtained when scanning front side of Czech ID + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPCzIDFrontRecognizerResult : PPBlinkOcrRecognizerResult + +/** + * Returns the ID card number of the Czech ID. + * @return ID card number of the Czech ID. + */ +- (NSString *)identityCardNumber; + +/** + * Returns the first name of the Czech ID owner. + * @return first name of the Czech ID owner. + */ +- (NSString *)firstName; + +/** + * Returns the last name of the Czech ID owner. + * @return last name of the Czech ID owner. + */ +- (NSString *)lastName; + +/** + * Returns the date of birth of the Czech ID owner. + * @return date of birth of the Czech ID owner. + */ +- (NSString *)dateOfBirth; + +/** + * Returns the date of issue of the Czech ID owner. + * @return date of issue of the Czech ID owner. + */ +- (NSString *)dateOfIssue; + +/** + * Returns the date of expiry of the Czech ID owner. + * @return date of expiry of the Czech ID owner. + */ +- (NSString *)dateOfExpiry; + +/** + * Returns the sex of the Czech ID owner. + * @return sex of the Czech ID owner. + */ +- (NSString *)sex; + +/** + * Returns the place of birth of the Czech ID owner. + * @return place of birth of the Czech ID owner. + */ +- (NSString *)placeOfBirth; + +@end diff --git a/MicroBlink.framework/Headers/PPCzIDFrontRecognizerSettings.h b/MicroBlink.framework/Headers/PPCzIDFrontRecognizerSettings.h new file mode 100644 index 000000000..fef414316 --- /dev/null +++ b/MicroBlink.framework/Headers/PPCzIDFrontRecognizerSettings.h @@ -0,0 +1,63 @@ +// +// PPCzIDFrontRecognizerSettings.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPRecognizerSettings.h" + +/** +* Settings class for configuring Czech Front ID Recognizer +* +* Czech Front ID recognizer is used for scanning front side of Czech ID. +*/ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPCzIDFrontRecognizerSettings : PPRecognizerSettings + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains face. + * This image will be sent to scan delegate during recognition process if displaying of face image + * is enabled via displayFaceImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* ID_FACE; + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains signature. + * This image will be sent to scan delegate during recognition process if displaying of face image + * is enabled via displaySignatureImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* ID_SIGNATURE; + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains full document. + * This image will be sent to scan delegate during recognition process if displaying of full document image + * is enabled via displayFullDocumentImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* FULL_DOCUMENT_IMAGE; + +/** + * Sets whether face photo from ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayFacePhoto; + +/** + * Sets whether signature photo of ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displaySignaturePhoto; + +/** + * Sets whether full image of ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayFullDocumentImage; + +@end diff --git a/MicroBlink.framework/Headers/PPMrtdDocumentType.h b/MicroBlink.framework/Headers/PPMrtdDocumentType.h new file mode 100644 index 000000000..4e62672a7 --- /dev/null +++ b/MicroBlink.framework/Headers/PPMrtdDocumentType.h @@ -0,0 +1,70 @@ +// +// PPMRTDDocumentType.h +// BlinkIdFramework +// +// Created by Boris Trubic on 02/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import + +/** + * Enumeration of supported MRTD document types + */ +typedef NS_ENUM(NSUInteger, PPMrtdDocumentType) { + + /** + * Unknown documen type + */ + PPMrtdTypeUnknown, + + /** + * Identity card + */ + PPMrtdTypeIdentityCard, + + /** + * Passport + */ + PPMrtdTypePassport, + + /** + * Visa + */ + PPMrtdTypeVisa, + + /** + * US Green Card + */ + PPMrtdTypeGreenCard +}; + +// Ignore unused method warning +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wall" + +static NSString* mrtdDocumentTypeToString(PPMrtdDocumentType documentType){ + switch (documentType) { + case PPMrtdTypeIdentityCard: + return @"Identity Card"; + break; + + case PPMrtdTypePassport: + return @"Passport"; + break; + + case PPMrtdTypeVisa: + return @"Visa"; + break; + + case PPMrtdTypeGreenCard: + return @"Green Card"; + break; + + default: + return @""; + break; + } +} + +#pragma clang diagnostic pop \ No newline at end of file diff --git a/MicroBlink.framework/Headers/PPMrtdRecognizerResult.h b/MicroBlink.framework/Headers/PPMrtdRecognizerResult.h index a3d264979..0e50e2497 100644 --- a/MicroBlink.framework/Headers/PPMrtdRecognizerResult.h +++ b/MicroBlink.framework/Headers/PPMrtdRecognizerResult.h @@ -8,6 +8,7 @@ #import "PPTemplatingRecognizerResult.h" #import "PPOcrLayout.h" +#import "PPMrtdDocumentType.h" NS_ASSUME_NONNULL_BEGIN @@ -30,6 +31,13 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPMrtdRecognizerResult : PPTemplatingReco */ - (BOOL)isParsed; +/** + * Returns MRTD document type of recognized document. + * + * return PPMrtdDocumentType + */ +- (PPMrtdDocumentType)documentType; + /** * Returns three-letter code which indicate the issuing State. * Three-letter codes are based on Alpha-3 codes for entities specified in @@ -41,6 +49,7 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPMrtdRecognizerResult : PPTemplatingReco /** * Unique number of the document. Document number contains up to 9 characters. + * Element does not exist on US Green Card. To see which document was scanned use documentType property. * * @return documentNumber */ @@ -104,21 +113,45 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPMrtdRecognizerResult : PPTemplatingReco - (NSString *)sex; /** - * Returns first optional data. - * Returns nil or empty string if not available. + * Returns first optional data. Returns nil or empty string if not available. + * Element does not exist on US Green Card. To see which document was scanned use documentType property. * * @return optional data 1 */ - (NSString *)opt1; /** - * Returns first optional data. - * Returns nil or empty string if not available. + * Returns first optional data. Returns nil or empty string if not available. + * Element does not exist on Passports and Visas. To see which document was scanned use documentType property. * * @return optional data 2 */ - (NSString *)opt2; +/** + * Returns alien number. Returns nil or empty string if not available. + * Exists only on US Green Cards. To see which document was scanned use documentType property. + * + * @return alien number + */ +- (NSString *)alienNumber; + +/** + * Returns application receipt number. Returns nil or empty string if not available. + * Exists only on US Green Cards. To see which document was scanned use documentType property. + * + * @return application receipt number + */ +- (NSString *)applicationReceiptNumber; + +/** + * Returns immigrant case number. Returns nil or empty string if not available. + * Exists only on US Green Cards. To see which document was scanned use documentType property. + * + * @return immigrant case number + */ +- (NSString *)immigrantCaseNumber; + /** * Returns the entire Machine Readable Zone text from ID. This text is usually used for parsing * other elements. diff --git a/MicroBlink.framework/Headers/PPMultiDetectorSettings.h b/MicroBlink.framework/Headers/PPMultiDetectorSettings.h index 2b95d516d..6055d1d3e 100644 --- a/MicroBlink.framework/Headers/PPMultiDetectorSettings.h +++ b/MicroBlink.framework/Headers/PPMultiDetectorSettings.h @@ -9,10 +9,16 @@ #import "PPDetectorSettings.h" /** - * Settings for detector which combines multiple detectors inside + * Settings for detector which combines multiple detectors inside. + * + * As only one PPDetectorSettings can be used at a time, PPMultiDetectorSettings wraps multiple settings so they can be used simultaneously. + * In other words, it is necessary to use PPMultiDetectorSettings when more than 1 detectors are needed. */ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPMultiDetectorSettings : PPDetectorSettings +/** + * Creates detector with array of concrete detectors. + */ - (instancetype)initWithSettingsArray:(NSArray<__kindof PPDetectorSettings *> *)settingsArray; /** diff --git a/MicroBlink.framework/Headers/PPOcrEngineOptions.h b/MicroBlink.framework/Headers/PPOcrEngineOptions.h index 74c1a8d1e..83d16db61 100644 --- a/MicroBlink.framework/Headers/PPOcrEngineOptions.h +++ b/MicroBlink.framework/Headers/PPOcrEngineOptions.h @@ -63,14 +63,15 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPOcrCharKey : NSObject @end /** - * Options used for OCR process + * Options used for OCR process. These options enable you to customize how some OCR parsers work. + * For example, you can set character whitelists, character height, supported fonts etc. */ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPOcrEngineOptions : NSObject -///** -// * Internal implementation -// */ -//@property (nonatomic, readonly, assign) OcrEngineOptionsImpl* options; +/** + * Creates PPOcrEngineOptions with default settings. + */ +- (instancetype)init; /** * Minimal height of the line of text given in pixels. All chars smaller than this value will be ignored. @@ -137,7 +138,7 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPOcrEngineOptions : NSObject * * Default: all chars with all fonts. */ -@property (nonatomic, strong) NSSet* charWhitelist; +@property (nonatomic, strong) NSSet *charWhitelist; @end diff --git a/MicroBlink.framework/Headers/PPRawOcrParserFactory.h b/MicroBlink.framework/Headers/PPRawOcrParserFactory.h index ac813dd91..14035b305 100644 --- a/MicroBlink.framework/Headers/PPRawOcrParserFactory.h +++ b/MicroBlink.framework/Headers/PPRawOcrParserFactory.h @@ -16,11 +16,11 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPRawOcrParserFactory : PPOcrParserFactory /** - * Ocr Engine options used in Raw ocr parsing + * Sets desired options for a parser. Options enable various customizations of a parsers such as: allowed characters, character heigh, etc. * * Default: [[PPOcrEngineOptions alloc] init] */ -@property (nonatomic, strong) PPOcrEngineOptions *options; +-(void)setOptions:(PPOcrEngineOptions *) options; /** * Use algorithm for combining consecutive OCR results between video frames diff --git a/MicroBlink.framework/Headers/PPRegexOcrParserFactory.h b/MicroBlink.framework/Headers/PPRegexOcrParserFactory.h index ee70b74e2..8eb088af6 100644 --- a/MicroBlink.framework/Headers/PPRegexOcrParserFactory.h +++ b/MicroBlink.framework/Headers/PPRegexOcrParserFactory.h @@ -32,11 +32,11 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPRegexOcrParserFactory : PPOcrParserFact @property (nonatomic) NSString *regex; /** - * Ocr Engine options used in Raw ocr parsing + * Sets desired options for a parser. Options enable various customizations of a parsers such as: allowed characters, character heigh, etc. * * Default: [[PPOcrEngineOptions alloc] init] */ -@property (nonatomic) PPOcrEngineOptions *options; +-(void)setOptions:(PPOcrEngineOptions *) options; /** * Use algorithm for combining consecutive OCR results between video frames diff --git a/MicroBlink.framework/Headers/PPSingaporeIDRecognizerResult.h b/MicroBlink.framework/Headers/PPSingaporeIDRecognizerResult.h new file mode 100644 index 000000000..485ea8aac --- /dev/null +++ b/MicroBlink.framework/Headers/PPSingaporeIDRecognizerResult.h @@ -0,0 +1,75 @@ +// +// PPSingaporeIDRecognizerResult.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPBlinkOcrRecognizerResult.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * Class representing values obtained when scanning Singapore ID. + * Both front and back side can be scanned but the results will be different for each side + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPSingaporeIDRecognizerResult : PPBlinkOcrRecognizerResult + +/** + * Returns the identity card number of the Singapore ID. + * @return identity card number of the Singapore ID. + */ +- (NSString *)identityCardNumber; + +/** + * Returns the name of the Singapore ID owner. + * @return name of the Singapore ID owner. + */ +- (NSString *)name; + +/** + * Returns the race of the Singapore ID owner. + * @return race of the Singapore ID owner. + */ +- (NSString *)race; + +/** + * Returns the sex of the Singapore ID owner. + * @return sex of the Singapore ID owner. + */ +- (NSString *)sex; + +/** + * Returns the date of birth of the Singapore ID owner. + * @return date of birth of the Singapore ID owner. + */ +- (NSString *)dateOfBirth; + +/** + * Returns the country of birth of the Singapore ID owner. + * @return country of birth of the Singapore ID owner. + */ +- (NSString *)countryOfBirth; + +/** + * Returns the blood group of the Singapore ID owner. + * @return blood group of the Singapore ID owner. + */ +- (NSString *)bloodGroup; + +/** + * Returns the date of issue of the Singapore ID. + * @return date of issue of the Singapore ID. + */ +- (NSString *)dateOfIssue; + +/** + * Returns the address of the Singapore ID owner. + * @return address of the Singapore ID owner. + */ +- (NSString *)address; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MicroBlink.framework/Headers/PPSingaporeIDRecognizerSettings.h b/MicroBlink.framework/Headers/PPSingaporeIDRecognizerSettings.h new file mode 100644 index 000000000..ef140d392 --- /dev/null +++ b/MicroBlink.framework/Headers/PPSingaporeIDRecognizerSettings.h @@ -0,0 +1,92 @@ +// +// PPSingaporeIDRecognizerSettings.h +// BlinkIdFramework +// +// Created by Dino on 30/06/16. +// Copyright © 2016 MicroBlink Ltd. All rights reserved. +// + +#import "PPRecognizerSettings.h" + +/** + * Settings class for configuring Singapore ID Recognizer + * + * Singapore ID recognizer is used for scanning Singapore ID. + * This recognizer can scan both front and back side of the ID but the results of scanning will be different as + * some fields are not present on both sides + */ +PP_CLASS_AVAILABLE_IOS(6.0) @interface PPSingaporeIDRecognizerSettings : PPRecognizerSettings + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains face. + * This image will be sent to scan delegate during recognition process if displaying of face image + * is enabled via displayFaceImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* ID_FACE; + +/** + * Name of the image sent to didOutputMetadata method of scanDelegate object that contains full document. + * This image will be sent to scan delegate during recognition process if displaying of full document image + * is enabled via displayFullDocumentImage property and receiving of dewarpedImage in MetadataSettings is enabled. + */ +@property (nonatomic, readonly) NSString* FULL_DOCUMENT_IMAGE; + +/** + * Defines if race of Singapore ID owner should be extracted + * + * Default: YES + */ +@property (nonatomic) BOOL extractRace; + +/** + * Defines if date of birth of Singapore ID owner should be extracted + * + * Default: YES + */ +@property (nonatomic) BOOL extractDateOfBirth; + +/** + * Defines if sex of Singapore ID owner should be extracted + * + * Default: YES + */ +@property (nonatomic) BOOL extractSex; + +/** + * Defines if country of birth of Singapore ID owner should be extracted + * + * Default: YES + */ +@property (nonatomic) BOOL extractCountryOfBirth; + +/** + * Defines if blood group of Singapore ID owner should be extracted + * + * Default: YES + */ +@property (nonatomic) BOOL extractBloodGroup; + +/** + * Defines if date of issue of Singapore ID owner should be extracted + * + * Default: YES + */ +@property (nonatomic) BOOL extractDateOfIssue; + +/** + * Sets whether portrait image from ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayPortraitImage; + +/** + * Sets whether full image of ID card should be sent to didOutputMetadata method of scanDelegate object. + * If you want to recieve this image, be sure to enable dewarpedImage in MetadataSettings. + * + * Default: NO + */ +@property (nonatomic) BOOL displayFullDocumentImage; + +@end diff --git a/MicroBlink.framework/MicroBlink b/MicroBlink.framework/MicroBlink index 64f3415d7..15b3dbcdc 100644 --- a/MicroBlink.framework/MicroBlink +++ b/MicroBlink.framework/MicroBlink @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59cf8107f1604c3b46e3d759ade487276e04e13e83228e5754010a935d2a39ca -size 114050144 +oid sha256:5d3a61875da76957887d08fafd62da9335d29e9e576c1cf7f73b57e089a45bda +size 115966904 diff --git a/PPBlinkID.podspec b/PPBlinkID.podspec index 943046bde..38d807296 100644 --- a/PPBlinkID.podspec +++ b/PPBlinkID.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "PPBlinkID" - s.version = "2.1.0" + s.version = "2.2.0" s.summary = "A delightful component for barcode scanning" s.homepage = "http://microblink.com" @@ -31,7 +31,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/BlinkID/blinkid-ios.git', - :tag => 'v2.1.0' + :tag => 'v2.2.0' } s.platform = :ios diff --git a/README.md b/README.md index f9410ad5f..9151e07e9 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,13 @@ BlinkID is a part of family of SDKs developed by [MicroBlink](http://www.microbl [CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like BlinkID in your projects. See the ["Getting Started" guide for more information](https://github.com/BlinkID/blinkid-ios/wiki/Getting-started). -- If you wish to use version v2.0.0 or above, you need to install Git Large File storage as described here: https://git-lfs.github.com +- If you wish to use version v1.4.0 or above, you need to install [Git Large File Storage](https://git-lfs.github.com) by running these comamnds: +```shell +brew install git-lfs +git lfs install +``` + +- **Be sure to restart your console after installing Git LFS** - If you're using CocoaPods, you can easily try our sample apps by running the following command in your terminal window: @@ -41,7 +47,7 @@ pod try PPBlinkID ```ruby platform :ios, '7.0' -pod 'PPBlinkID', '~> 2.1.0' +pod 'PPBlinkID', '~> 2.2.0' ``` ## Requirements diff --git a/Release notes.md b/Release notes.md index d081337ba..c48559671 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,13 @@ +## 2.2.0 + +- iOS updates: + - Added recognizer for Singapore ID + - Added recognizer for Austrian ID + - Added recognizer for Czech ID + +- iOS bugfixes: + - PPOcrEngineOptions are now applyed correctly when set + ## 2.1.0 - iOS updates: diff --git a/Samples/BlinkID-sample-Swift/BlinkID-sample-Swift/ViewController.swift b/Samples/BlinkID-sample-Swift/BlinkID-sample-Swift/ViewController.swift index e4d09311b..823851bef 100644 --- a/Samples/BlinkID-sample-Swift/BlinkID-sample-Swift/ViewController.swift +++ b/Samples/BlinkID-sample-Swift/BlinkID-sample-Swift/ViewController.swift @@ -39,7 +39,7 @@ class ViewController: UIViewController, PPScanningDelegate { /** 2. Setup the license key */ // Visit www.microblink.com to get the license key for your app - settings.licenseSettings.licenseKey = "N7E2CVWA-53NU6P42-4R5PPORH-EG4IDJLM-2DYMTRYX-YYID4OQ4-QQGZRDLH-PL22BO5S" + settings.licenseSettings.licenseKey = "DQJ6ICMF-YSQFSXVG-YMCULUIW-RGFDKJGE-UL4FWYU7-RI2SJRFC-7BNWEHZK-QERKXNQU" /** diff --git a/Samples/BlinkID-sample/BlinkID-sample/ViewController.m b/Samples/BlinkID-sample/BlinkID-sample/ViewController.m index 230ec133a..c838386f5 100644 --- a/Samples/BlinkID-sample/BlinkID-sample/ViewController.m +++ b/Samples/BlinkID-sample/BlinkID-sample/ViewController.m @@ -56,7 +56,7 @@ - (PPCameraCoordinator *)coordinatorWithError:(NSError**)error { /** 2. Setup the license key */ // Visit www.microblink.com to get the license key for your app - settings.licenseSettings.licenseKey = @"NO3GLCN2-65O6NDWH-KFJ7IEAD-747A4K4K-XVTN2CYR-IXRWTKNZ-7JLWRKSV-BDQWXFQG"; // Valid temporarily + settings.licenseSettings.licenseKey = @"J4F26WEE-32XOS35V-S7OKJBGY-JS6NQTF4-3BGLZWCM-XTMEZPGY-JS6NRTHC-TBLJKUKQ"; // Valid temporarily /** @@ -67,43 +67,14 @@ - (PPCameraCoordinator *)coordinatorWithError:(NSError**)error { { // Remove this if you're not using MRTD recognition // To specify we want to perform MRTD (machine readable travel document) recognition, initialize the MRTD recognizer settings - PPMrtdRecognizerSettings *mrtdRecognizerSettings = [[PPMrtdRecognizerSettings alloc] init]; + PPSingaporeIDRecognizerSettings *mrtdRecognizerSettings = [[PPSingaporeIDRecognizerSettings alloc] init]; /** You can modify the properties of mrtdRecognizerSettings to suit your use-case */ - // tell the library to get full image of the document. Setting this to YES makes sense just if - // settings.metadataSettings.dewarpedImage = YES, otherwise it wastes CPU time. - mrtdRecognizerSettings.dewarpFullDocument = NO; - // Add MRTD Recognizer setting to a list of used recognizer settings [settings.scanSettings addRecognizerSettings:mrtdRecognizerSettings]; } - { // Remove this if you're not using USDL recognition - - // To specify we want to perform USDL (US Driver's license) recognition, initialize the USDL recognizer settings - PPUsdlRecognizerSettings *usdlRecognizerSettings = [[PPUsdlRecognizerSettings alloc] init]; - - /** You can modify the properties of usdlRecognizerSettings to suit your use-case */ - - // Add USDL Recognizer setting to a list of used recognizer settings - [settings.scanSettings addRecognizerSettings:usdlRecognizerSettings]; - } - - { // Remove this if you're not using EUDL recognition - - // To specify we want to perform EUDL (EU Driver's license) recognition, initialize the EUDL recognizer settings - PPEudlRecognizerSettings *eudlRecognizerSettings = [[PPEudlRecognizerSettings alloc] initWithEudlCountry:PPEudlCountryUnitedKingdom]; - - /** You can modify the properties of eudlRecognizerSettings to suit your use-case */ - - // If you want to save the image of the EUDL, set this to YES - eudlRecognizerSettings.showFullDocument = YES; - - // Add EUDL Recognizer setting to a list of used recognizer settings - [settings.scanSettings addRecognizerSettings:eudlRecognizerSettings]; - } - /** 4. Initialize the Scanning Coordinator object */ PPCameraCoordinator *coordinator = [[PPCameraCoordinator alloc] initWithSettings:settings]; @@ -175,9 +146,9 @@ - (void)scanningViewController:(UIViewController *)sca // Collect data from the result for (PPRecognizerResult* result in results) { - if ([result isKindOfClass:[PPMrtdRecognizerResult class]]) { + if ([result isKindOfClass:[PPSingaporeIDRecognizerResult class]]) { /** MRTD was detected */ - PPMrtdRecognizerResult* mrtdResult = (PPMrtdRecognizerResult*)result; + PPSingaporeIDRecognizerResult* mrtdResult = (PPSingaporeIDRecognizerResult*)result; title = @"MRTD"; message = [mrtdResult description]; } diff --git a/Samples/BlinkOCR-sample/BlinkOCR-sample/ViewController.m b/Samples/BlinkOCR-sample/BlinkOCR-sample/ViewController.m index c211e3b47..423a498f5 100644 --- a/Samples/BlinkOCR-sample/BlinkOCR-sample/ViewController.m +++ b/Samples/BlinkOCR-sample/BlinkOCR-sample/ViewController.m @@ -56,7 +56,7 @@ - (PPCameraCoordinator *)coordinatorWithError:(NSError**)error { /** 2. Setup the license key */ // Visit www.microblink.com to get the license key for your app - settings.licenseSettings.licenseKey = @"E5GAM3PR-QUAAZNCG-4OZNNF5A-6M3ZZNAG-EO4V2VWM-ZOWXP23P-AJB2Q76G-CJYXH7NE"; + settings.licenseSettings.licenseKey = @"IYKDZ5KK-Z43DS2MO-R6PU43YC-IOUP7NYN-B3YM4B2Y-FMLRZ6TY-CIGQ44BR-7T4PV7RO"; /** diff --git a/Samples/Detector-sample/Detector-sample/ViewController.m b/Samples/Detector-sample/Detector-sample/ViewController.m index 554f85bed..880d98e4b 100644 --- a/Samples/Detector-sample/Detector-sample/ViewController.m +++ b/Samples/Detector-sample/Detector-sample/ViewController.m @@ -63,7 +63,7 @@ - (PPCameraCoordinator *)coordinatorWithError:(NSError**)error { /** 2. Setup the license key */ // Visit www.microblink.com to get the license key for your app - settings.licenseSettings.licenseKey = @"G5R3PKW5-7KUCFX6B-HHG4VJE4-76CSSGVD-6FJ6JFSP-5U4AH3JY-APWTQA7N-HABZVSIJ"; // Valid temporarily + settings.licenseSettings.licenseKey = @"EXWAJZZY-A4G7YT5N-FDEXLOKC-6LSZHCGZ-WX7YKKI2-UPYVHZEW-J7WTRA63-WTKN5A6Y"; // Valid temporarily /** 3. Set up what is being scanned. See detailed guides for specific use cases. */ diff --git a/Samples/DirectAPI-sample/DirectAPI-sample/CameraViewController.m b/Samples/DirectAPI-sample/DirectAPI-sample/CameraViewController.m index 52bc7befb..d993f5e12 100644 --- a/Samples/DirectAPI-sample/DirectAPI-sample/CameraViewController.m +++ b/Samples/DirectAPI-sample/DirectAPI-sample/CameraViewController.m @@ -41,7 +41,7 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id