Skip to content

Commit

Permalink
Merge pull request #58 from PDF417/jenkins/stable-build
Browse files Browse the repository at this point in the history
Jenkins/stable build
  • Loading branch information
juraskrlec authored Nov 9, 2020
2 parents fc516e6 + e0196d5 commit 0bfe4ff
Show file tree
Hide file tree
Showing 526 changed files with 29,045 additions and 4,411 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Release notes

## 7.3.0

### New features:

- Introducing support for new framework format - XCFramework:
- it contains all the necessary device and simulator architecture slices
- no neeed to remove simulator slices before distributing your app to the App Store as described [here](https://github.com/PDF417/pdf417-ios#unsupported-architectures-when-submitting-app-to-app-store)
- for now, only available from this repo, **not available on Cocoapods**
- We have translated complete SDK to following languages: **Croatian**, **Czech**, **English**, **French**, **German**, **Italian**, **Portuguese**, **Slovak**, **Spanish**, **Malay**, **Dutch**, **Hungarian**, **Indonesian**, **Arabic(UAE)**, **Romanian**, **Chinese traditional**, **Chinese simplified**, **Thai**, **Hewbrew** and **Vietnamese**
- We added `disableMicroblinkLogging` method to `MBLogger` for easier implementation
- This also enables disabling Microblink logging in Swift

### iOS version support change:

- From now on, we are not supporting **iOS 8** version.

### Major API change:

- We added `errorCallback` on `MBMicroblinkSDK` methods which needs to be implemented for properly setting up the license key.

### Minor API changes:

- Methods `pauseScanning` and `resumeScanningAndResetState` in `MBRecognizerRunnerViewController` do not return anymore `BOOL`
- use `isScanningPaused` to check if scanning is paused
- We renamed `MBRecogitionMode` to `MBRecognitionDebugMode` in `MBRecognizerCollection`
- Swift:
- We renamed all `sharedInstance` to `shared`
- All enums are now `Int`
- All `unsigned integers` are now `Int`

### Bugfixes:

- Fixed issue where recognizer's result state would not be the same as recognizer's runner state after finished scanning
- Fixed issue when pressing immediately close button on overlay view controllers would freeze for couple of seconds SDK
- Fixed memory leaks that could cause crashes in some cases
- Fixed `Torch` activation for all iOS versions
- We removed OpenGL entirely which was causing unexpected crashes
- Large memory consumption introduced is due to 4K video session on all 4K eligible iPhones; we introduced new camera presets 1080p and 4K, so to reduce your app memory consumption set camera preset on 1080p or 720p
- We added a `nullable` attribute to the `recognizerRunnerViewControllerWithOverlayViewController` to fix a force unwrapping issue in Swift that could occur if the camera is broken or not working
- We fixed race conditions and camera asserts that could sometimes cause crashes

## 7.2.0

- Updates and additions
Expand Down
Binary file removed Microblink.bundle/Info.plist
Binary file not shown.
23 changes: 0 additions & 23 deletions Microblink.bundle/en.strings

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 4 additions & 4 deletions Microblink.framework/Headers/MBBarcodeRecognizerResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import "MBMicroblinkDefines.h"
#import "MBRecognizerResult.h"
#import "MBBarcodeResult.h"
#import "MBBarcodeType.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -39,11 +39,11 @@ MB_INIT_UNAVAILABLE
@property(nonatomic, assign, readonly) BOOL uncertain;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Enumeration of possible barcode formats
*/
typedef NS_ENUM(NSUInteger, MBBarcodeType) {
typedef NS_ENUM(NSInteger, MBBarcodeType) {
MBBarcodeNone = 0,
/** QR code */
MBBarcodeTypeQR,
Expand Down
3 changes: 3 additions & 0 deletions Microblink.framework/Headers/MBBarcodeUIComponents.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
#import "MBTapToFocusSubview.h"
#import "MBResultSubview.h"
#import "MBGlareStatusSubview.h"

// Logger
#import "MBLogger.h"
16 changes: 11 additions & 5 deletions Microblink.framework/Headers/MBCameraSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@
/**
* Camera resolution preset
*/
typedef NS_ENUM(NSUInteger, MBCameraPreset) {
typedef NS_ENUM(NSInteger, MBCameraPreset) {

/** 480p video will always be used */
MBCameraPreset480p,

/** 720p video will always be used */
MBCameraPreset720p,

/** 1080p video will always be used */
MBCameraPreset1080p,

/** 4K video will always be used */
MBCameraPreset4K,

/** The library will calculate optimal resolution based on the use case and device used */
MBCameraPresetOptimal,
Expand All @@ -35,7 +41,7 @@ typedef NS_ENUM(NSUInteger, MBCameraPreset) {
/**
* Camera type
*/
typedef NS_ENUM(NSUInteger, MBCameraType) {
typedef NS_ENUM(NSInteger, MBCameraType) {

/** Back facing camera */
MBCameraTypeBack,
Expand All @@ -47,7 +53,7 @@ typedef NS_ENUM(NSUInteger, MBCameraType) {
/**
* Camera autofocus restricion mode
*/
typedef NS_ENUM(NSUInteger, MBCameraAutofocusRestriction) {
typedef NS_ENUM(NSInteger, MBCameraAutofocusRestriction) {

/** Default. Indicates that the autofocus system should not restrict the focus range. */
MBCameraAutofocusRestrictionNone,
Expand All @@ -68,7 +74,7 @@ MB_CLASS_AVAILABLE_IOS(8.0)
/**
* Camera preset. With this property you can set the resolution of the camera
*
* Default: PPCameraPresetOptimal
* Default: MBCameraPresetOptimal
*/
@property (nonatomic, assign) MBCameraPreset cameraPreset;

Expand All @@ -92,7 +98,7 @@ MB_CLASS_AVAILABLE_IOS(8.0)
/**
* Range restriction for camera autofocus.
*
* Default: PPCameraAutofocusRestrictionNone
* Default: MBCameraAutofocusRestrictionNone
*/
@property (nonatomic, assign) MBCameraAutofocusRestriction cameraAutofocusRestriction;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ MB_CLASS_AVAILABLE_IOS(8.0)
/**
* Default: UIInterfaceOrientationMaskPortrait
*/
@property (nonatomic, assign) NSUInteger supportedOrientations;
@property (nonatomic, assign) UIInterfaceOrientationMask supportedOrientations;

/**
* Reconfigures current recognizer collection to new recognizer collection. Use this method to reconfigure what you wish to scan.
Expand Down
3 changes: 3 additions & 0 deletions Microblink.framework/Headers/MBDetectionStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ typedef NS_OPTIONS(NSInteger, MBDetectionStatus) {

/** Object was successfully detected, but the camera is too near to the object for processing */
MBDetectionStatusCameraTooNear = 1 << 10,

/** Document detected, but document is too close to the edge of the frame */
MBDetectionStatusDocumentTooCloseToEdge = 1 << 11,
};
2 changes: 1 addition & 1 deletion Microblink.framework/Headers/MBDotsResultSubview.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MB_CLASS_AVAILABLE_IOS(8.0)
*
* Default: 50
*/
@property (assign, nonatomic) NSUInteger dotCount;
@property (assign, nonatomic) NSInteger dotCount;

@end

Expand Down
2 changes: 1 addition & 1 deletion Microblink.framework/Headers/MBFrameGrabberRecognizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ MB_CLASS_AVAILABLE_IOS(8.0) MB_FINAL
* Note that all buffers associated with image are available only during life of this method.
* As soon as this method exits, there is no guarantee that buffers will be valid. If you need
* to store image for later processing, showing or saving, make sure you create a copy of it.
* @param cameraFrame The {PPImage} containing frame that will be processed.
* @param cameraFrame The {MBImage} containing frame that will be processed.
* @param focused Information whether or not given frame is considered to be in focus. This
* information is calculated on the basis of frame quality estimation algorithm
* combined with information about actual frame that was provided by camera device.
Expand Down
2 changes: 1 addition & 1 deletion Microblink.framework/Headers/MBGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ void CGControlPointsForArcBetweenPointsWithRadius(CGPoint startPoint, CGPoint en
#pragma mark - ScanningRegion

// Convert given frame into scanning region frame for given bounds.
PP_EXTERN CGRect scanningRegionForFrameInBounds(CGRect frame, CGRect bounds);
MB_EXTERN CGRect MBscanningRegionForFrameInBounds(CGRect frame, CGRect bounds);
9 changes: 5 additions & 4 deletions Microblink.framework/Headers/MBImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@

#import "Foundation/Foundation.h"
#import "CoreMedia/CoreMedia.h"
#import <UIKit/UIKit.h>
#import "MBMicroblinkDefines.h"

NS_ASSUME_NONNULL_BEGIN

/**
* Enum which describes text orientation on an image.
*/
typedef NS_ENUM(NSUInteger, MBProcessingOrientation) {
typedef NS_ENUM(NSInteger, MBProcessingOrientation) {
/** Text oriented same as picture */
MBProcessingOrientationUp,
/** Text is rotated 90 degrees clockwise */
Expand All @@ -34,9 +35,9 @@ MB_CLASS_AVAILABLE_IOS(8.0)

/**
* UIImage of wrapped image.
* If this PPImage wasn't created with UIImage, UIImage will be created with first access of this property.
* If this MBImage wasn't created with UIImage, UIImage will be created with first access of this property.
*/
@property (nonatomic, readonly) UIImage *image;
@property (nonatomic, readonly, nullable) UIImage *image;

/**
* Region of the image used for scanning, where the whole image is specified with CGRectMake(0.0, 0.0, 1.0, 1.0).
Expand Down Expand Up @@ -81,7 +82,7 @@ MB_CLASS_AVAILABLE_IOS(8.0)
@property (nonatomic) BOOL cameraFrame;

/**
* Creates PPImage around UIImage.
* Creates MBImage around UIImage.
*/
+ (instancetype)imageWithUIImage:(UIImage *)image;

Expand Down
24 changes: 24 additions & 0 deletions Microblink.framework/Headers/MBLicenseError.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// MBLicenseError.h
// MicroblinkDev
//
// Created by Mijo Gracanin on 23/09/2020.
//

#ifndef MBLicenseError_h
#define MBLicenseError_h

#import <Foundation/Foundation.h>

extern NSString * const MBLicenseErrorNotification;

typedef NS_ENUM(NSInteger, MBLicenseError) {
MBLicenseErrorNetworkRequired,
MBLicenseErrorUnableToDoRemoteLicenceCheck,
MBLicenseErrorLicenseIsLocked,
MBLicenseErrorLicenseCheckFailed
};

typedef void(^MBLicenseErrorBlock)(MBLicenseError licenseError);

#endif /* MBLicenseError_h */
38 changes: 38 additions & 0 deletions Microblink.framework/Headers/MBLogger.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// MBLogger.h
// PhotoMathFramework
//
// Created by Marko Mihovilić on 23/03/16.
// Copyright © 2016 Microblink Ltd. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "MBMicroblinkDefines.h"

typedef NS_ENUM(NSInteger, MBLogLevel) {
MBLogLevelError,
MBLogLevelWarning,
MBLogLevelInfo,
MBLogLevelDebug,
MBLogLevelVerbose
};

@protocol MBLoggerDelegate <NSObject>

@optional

- (void)log:(MBLogLevel)level message:(const char *)message;
- (void)log:(MBLogLevel)level format:(const char *)format arguments:(const char *)arguments;

@end

MB_CLASS_AVAILABLE_IOS(8.0) @interface MBLogger : NSObject

@property (nonatomic) id<MBLoggerDelegate> delegate;

+ (instancetype)sharedInstance NS_SWIFT_NAME(shared());

- (void)disableMicroblinkLogging;

@end
40 changes: 37 additions & 3 deletions Microblink.framework/Headers/MBMicroBlinkDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#ifndef MBMicroblinkDefines_h
#define MBMicroblinkDefines_h

#import "PPMicroblinkDefines.h"
#import "MBMicroblinkInitialization.h"
#import "AvailabilityMacros.h"

Expand All @@ -18,9 +17,44 @@
# define MB_FINAL
#endif

#define MB_CLASS_AVAILABLE_IOS PP_CLASS_AVAILABLE_IOS
#define MB_CLASS_DEPRECATED_IOS PP_CLASS_DEPRECATED_IOS
#define MB_CLASS_AVAILABLE_IOS(_ios) NS_CLASS_AVAILABLE_IOS(_ios)
#define MB_CLASS_DEPRECATED_IOS(_iosIntro, _iosDep, ...) NS_CLASS_DEPRECATED(NA, NA, _iosIntro, _iosDep, __VA_ARGS__)
#define MB_PROPERTY_DEPRECATED DEPRECATED_ATTRIBUTE
#define MB_ATTRIBUTE_DEPRECATED DEPRECATED_ATTRIBUTE
#define MB_CLASS_DEPRECATED(message) __attribute__((deprecated(message)))

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

#ifdef __cplusplus
#define MB_EXTERN extern "C" __attribute__((visibility("default")))
#else
#define MB_EXTERN extern __attribute__((visibility("default")))
#endif

typedef void(^MBBlock)(void);

#define MBASSERTE(condition, description) \
do { \
NSAssert(condition, description); \
if (!(condition)) { \
NSString *message = [NSString stringWithFormat:@"Assertion failed: (%s), %@, %s, file %s, line %d", #condition, description, __PRETTY_FUNCTION__, __FILE__, __LINE__]; \
LOGE("%s", [message UTF8String]); \
} \
} while (0)


#ifdef MB_DISABLE_OBFUSCATION

#define MB_OBS_IF_COPY(x) if(x) {
#define MB_OBS_ELSE_COPY } else {

#else

#define MB_OBS_IF_COPY(x) { MB::Obfuscation::IfWrapper(( [=]()->bool{ return (x); })).setThen( [=]() -> void
#define MB_OBS_ELSE_COPY ).setElse( [=]() -> void

#endif // MB_DISABLE_OBFUSCATION

#define MB_OBFUSCATED(value) [NSString stringWithFormat:@"%s", OBFUSCATED(value)]

#endif /* MBMicroblinkDefines_h */
Loading

0 comments on commit 0bfe4ff

Please sign in to comment.