Skip to content

Commit

Permalink
Updated Microblink framework
Browse files Browse the repository at this point in the history
  • Loading branch information
juraskrlec committed Jun 28, 2017
1 parent 6ed93d2 commit e12eace
Show file tree
Hide file tree
Showing 101 changed files with 3,904 additions and 557 deletions.
Binary file modified MicroBlink.bundle/Info.plist
Binary file not shown.
Binary file added MicroBlink.bundle/MicroBlink
Binary file not shown.
Binary file added MicroBlink.bundle/No Camera-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/arrow_pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/en.strings
Binary file not shown.
Binary file modified MicroBlink.bundle/torchoff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/torchoff_pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/torchon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/torchon_pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified MicroBlink.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions MicroBlink.framework/Headers/MicroBlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#import "PPModernOverlayViewController.h"
#import "PPOverlaySubview.h"

// Permission denied view controller
#import "PPPermissionDeniedViewController.h"

// Detectors
#import "PPPointsDetectorResult.h"
#import "PPQuadDetectorResult.h"
Expand Down
80 changes: 80 additions & 0 deletions MicroBlink.framework/Headers/PPApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
//
// App.h
// iphone-photopay
//
// Created by Ja on 11/2/11.
// Copyright (c) 2011 [email protected]. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PPMicroBlinkDefines.h"

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif

#define PP_IS_IPAD (([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad))

/*
* System Versioning Preprocessor Macros
*/

#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) \
([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) \
([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)

#define PP_NOTIFY(notificationKey, valueKey) \
{ \
NSDictionary *dict = [NSDictionary dictionaryWithObject:@(YES) forKey:valueKey]; \
[[NSNotificationCenter defaultCenter] postNotificationName:notificationKey object:nil userInfo:dict]; \
}

PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPApp : NSObject

@property (nonatomic) NSString *language;

/** Bundle with resources used in framework */
@property (nonatomic) NSBundle *resourcesBundle;

/** Obtain the shared instance */
+ (instancetype)instance;

/** Designated initializer */
- (id)init;

/** Sets the language used in PhotoPaySDK */
- (void)setLanguage:(NSString *)language;

/** Sets the language to default (i.e. language specified in the user's device settings */
- (void)setDefaultLanguage;

/** Pushes the UIApplication status bar style to a internally handled stack */
- (void)pushStatusBarStyle:(UIStatusBarStyle)statusBarStyle;

/** Returns the status bar style to the last saved value */
- (void)popStatusBarStyle;

/** Push the status bar hidden value */
- (void)pushStatusBarHidden:(BOOL)hidden;

/** pops the status bar hidden value */
- (void)popStatusBarHidden;

/** Sets the key that the help was shown to true */
- (void)setHelpShown:(BOOL)value;

/** Returns true if the help was already shown */
- (BOOL)isHelpShown;

/**
* This method check existance of the default resources bundle Microblink.bundle,
* and throws an exception if it's missing
*/
+ (NSBundle *)verifyAndGetDefaultResourcesBundle;

@end
29 changes: 13 additions & 16 deletions MicroBlink.framework/Headers/PPBarDecoderRecognizerResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,27 @@
/**
* Type of the barcode which BarDecoderRecognizer returnes
*/
typedef NS_ENUM(NSUInteger, PPBarDecoderBarcodeType){
typedef PP_DEPRECATED_IOS(1_0, 5_9_3) NS_ENUM(NSUInteger, PPBarDecoderBarcodeType) {
/** Code 128 */
PPBarDecoderBarcodeTypeCode128,
/** Code 39 */
PPBarDecoderBarcodeTypeCode39
};

NS_ASSUME_NONNULL_BEGIN

/**
* Result of scanning with BarDecoder Recognizer
*
* Contains raw Barcode detailed data, barcode type, and methods for getting string representation of results.
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerResult : PPRecognizerResult
PP_CLASS_DEPRECATED_IOS(1_0, 5_9_3, "Use PPBarcodeRecognizerResult instead")
@interface PPBarDecoderRecognizerResult : PPRecognizerResult

/**
* Type of the barcode scanned
*
* @return Type of the barcode
*/
- (PPBarDecoderBarcodeType)barcodeType;
- (PPBarDecoderBarcodeType)barcodeType PP_DEPRECATED_IOS(1_0, 5_9_3, "Use PPBarcodeType instead");

/**
* Flag indicating uncertain scanning data
Expand All @@ -44,7 +43,7 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerResult : PPRecogniz
/**
* Byte array with result of the scan
*/
- (NSData *)data;
- (NSData *_Nullable)data;

/**
* Retrieves string content of the scanned data using guessed encoding.
Expand All @@ -57,7 +56,7 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerResult : PPRecogniz
*
* @return created string, or nil if encoding couldn't be found.
*/
- (NSString *)stringUsingGuessedEncoding;
- (NSString *_Nullable)stringUsingGuessedEncoding;

/**
* Retrieves string content of the scanned data using given encoding.
Expand All @@ -66,18 +65,18 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerResult : PPRecogniz
*
* @return String created from data property, using given encoding
*/
- (NSString *)stringUsingEncoding:(NSStringEncoding)encoding;
- (NSString *_Nullable)stringUsingEncoding:(NSStringEncoding)encoding;

/**
* Raw barcode detailed result
*/
- (PPBarcodeDetailedData *)rawData;
- (PPBarcodeDetailedData *_Nullable)rawData;


/**
* Byte array with extended result of the scan, if available.
*/
- (NSData *)extendedData;
- (NSData *_Nullable)extendedData;

/**
* Retrieves string content of the extended scanned data using guessed encoding.
Expand All @@ -90,7 +89,7 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerResult : PPRecogniz
*
* @return created string, or nil if encoding couldn't be found.
*/
- (NSString *)extendedStringUsingGuessedEncoding;
- (NSString *_Nullable)extendedStringUsingGuessedEncoding;

/**
* Retrieves string content of the extended scanned data using given encoding.
Expand All @@ -99,12 +98,12 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerResult : PPRecogniz
*
* @return String created from extendedData property, using given encoding
*/
- (NSString *)extendedStringUsingEncoding:(NSStringEncoding)encoding;
- (NSString *_Nullable)extendedStringUsingEncoding:(NSStringEncoding)encoding;

/**
* Extended Raw barcode detailed result
*/
- (PPBarcodeDetailedData *)extendedRawData;
- (PPBarcodeDetailedData *_Nullable)extendedRawData;

/**
* Method which gives string representation for a given PPBarDecoderBarcodeType enum value.
Expand All @@ -113,8 +112,6 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerResult : PPRecogniz
*
* @return String representation of a given PPBarDecoderBarcodeType enum value.
*/
+ (NSString *)toTypeName:(PPBarDecoderBarcodeType)type;
+ (NSString *_Nonnull)toTypeName:(PPBarDecoderBarcodeType)type PP_DEPRECATED_IOS(1_0, 5_9_3, "Use PPBarcodeType instead");

@end

NS_ASSUME_NONNULL_END
11 changes: 6 additions & 5 deletions MicroBlink.framework/Headers/PPBarDecoderRecognizerSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
* Settings class for configuring BarDecoder Recognizer
*
* BarDecoder recognizer is used for scanning Code 39 and Code 128 barcodes and is superior in performance
* to ZXIngRecognizer
* to ZXingRecognizer
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerSettings : PPRecognizerSettings
PP_CLASS_DEPRECATED_IOS(1_0, 5_9_3, "Use PPBarcodeRecognizerSettings instead")
@interface PPBarDecoderRecognizerSettings : PPRecognizerSettings

/**
* Set this to YES to scan Code 39 barcodes
Expand Down Expand Up @@ -42,16 +43,16 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarDecoderRecognizerSettings : PPRecogn

/**
* Use automatic scale detection feature. This normally should not be used.
* The only situation where this helps in getting better scanning results is
* when using kPPUseVideoPresetPhoto on iPad devices.
* The only situation where this helps in getting better scanning results is
* when using kPPUseVideoPresetPhoto on iPad devices.
* Video preview resoution of 2045x1536 in that case is very large and autoscale helps.
*
* Default: NO
*/
@property (nonatomic) BOOL autoDetectScale;

/**
* Set this to YES to enable scanning of lower resolution barcodes
* Set this to YES to enable scanning of lower resolution barcodes
* at cost of additional processing time.
*
* Default: NO
Expand Down
9 changes: 5 additions & 4 deletions MicroBlink.framework/Headers/PPBarcodeDetailedData.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ typedef NS_ENUM(NSInteger, PPBarcodeElementType) {
/**
* represents one raw element in barcode
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarcodeElement : NSObject
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPBarcodeElement : NSObject

/** byte array contained in this barcode element */
@property (nonatomic, retain, readonly) NSData *elementBytes;
Expand All @@ -35,15 +36,15 @@ PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarcodeElement : NSObject
/**
Designated initializer shich sets byte array for specific barcode element type
*/
- (instancetype)initWithBytes:(NSData *)bytes
type:(PPBarcodeElementType)type;
- (instancetype)initWithBytes:(NSData *)bytes type:(PPBarcodeElementType)type;

@end

/**
* represents the collection of barcode raw elements
*/
PP_CLASS_AVAILABLE_IOS(6.0) @interface PPBarcodeDetailedData : NSObject
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPBarcodeDetailedData : NSObject

/** array of barcode elements (PPBarcodeElement *) contained in barcode */
@property (nonatomic, retain, readonly) NSArray *barcodeElements;
Expand Down
14 changes: 14 additions & 0 deletions MicroBlink.framework/Headers/PPBarcodeOverlayViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// PPBarcodeOverlayViewController.h
// BarcodeFramework
//
// Created by Jura on 22/12/13.
// Copyright (c) 2015 MicroBlink Ltd. All rights reserved.
//

#import "PPBaseBarcodeOverlayViewController.h"

PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPBarcodeOverlayViewController : PPBaseBarcodeOverlayViewController

@end
95 changes: 95 additions & 0 deletions MicroBlink.framework/Headers/PPBarcodeRecognizerResult.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
//
// PPBarcodeRecognizerResult.h
// MicroBlinkDev
//
// Created by Jura Skrlec on 26/06/2017.
//
//

#import "PPRecognizerResult.h"
#import "PPBarcodeDetailedData.h"

/**
* Type of the barcode which BarDecoderRecognizer returnes
*/
typedef NS_ENUM(NSUInteger, PPBarcodeType) {
/** Code 39 */
PPBarcodeTypeAztec,
/** Code 128 */
PPBarcodeTypeCode128,
/** Code 39 */
PPBarcodeTypeCode39,
/** Data Matrix */
PPBarcodeTypeDataMatrix,
/** EAN 13 */
PPBarcodeTypeEAN13,
/** EAN 8 */
PPBarcodeTypeEAN8,
/** ITF */
PPBarcodeTypeITF,
/** QR code */
PPBarcodeTypeQR,
/** UPCA */
PPBarcodeTypeUPCA,
/** UPCE */
PPBarcodeTypeUPCE,
};


/**
* Result of scanning with Barcode Recognizer
*
* Contains raw Barcode detailed data, barcode type, and methods for getting string representation of results.
*/
PP_CLASS_AVAILABLE_IOS(6.0)
@interface PPBarcodeRecognizerResult : PPRecognizerResult

/**
* Type of the barcode scanned
*
* @return Type of the barcode
*/
- (PPBarcodeType)barcodeType;

/**
* Byte array with result of the scan
*/
- (NSData *_Nullable)data;

/**
* Retrieves string content of the scanned data using guessed encoding.
*
* If you're 100% sure you know the exact encoding in the barcode, use stringUsingEncoding: method.
* Otherwise stringUsingDefaultEncoding.
*
* This method uses `[NSString stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:` method for
* guessing the encoding.
*
* @return created string, or nil if encoding couldn't be found.
*/
- (NSString *_Nullable)stringUsingGuessedEncoding;

/**
* Retrieves string content of the scanned data using given encoding.
*
* @param encoding The encoding for the returned string.
*
* @return String created from data property, using given encoding
*/
- (NSString *_Nullable)stringUsingEncoding:(NSStringEncoding)encoding;

/**
* Raw barcode detailed result
*/
- (PPBarcodeDetailedData *_Nullable)rawData;

/**
* Method which gives string representation for a given PPBarcodeType enum value.
*
* @param type PPBarcodeType enum value
*
* @return String representation of a given PPBarcodeType enum value.
*/
+ (NSString *_Nonnull)toTypeName:(PPBarcodeType)type;

@end
Loading

0 comments on commit e12eace

Please sign in to comment.