Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOD-2354] : Replace XZing library with AVFoundation framework #76

Merged
merged 13 commits into from
Aug 1, 2018

Conversation

vijaysingh-axway
Copy link
Contributor

@vijaysingh-axway vijaysingh-axway commented Jul 31, 2018

Copy link
Contributor

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few changes. In general: NICE!

TiBarcodeViewController *barcodeViewController;
MTBCamera selectedCamera;
MTBTorchMode selectedLEDMode;
NSString *displayedMessage;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please prefix all private properties with _.

@property(nonatomic,readonly) NSNumber *FORMAT_EAN_13;
@property(nonatomic,readonly) NSNumber *FORMAT_CODE_128;
@property(nonatomic,readonly) NSNumber *FORMAT_CODE_39;
@property(nonatomic,readonly) NSNumber *FORMAT_ITF;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we support all of these constants I assume?

@property(nonatomic,readonly) NSNumber *FORMAT_CODE_128;
@property(nonatomic,readonly) NSNumber *FORMAT_CODE_39;
@property(nonatomic,readonly) NSNumber *FORMAT_ITF;
- (id)canShow:(id)unused;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NSNumber *


- (void)setUseLED:(id)value;

- (id)useLED;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NSNumber *


- (void)cancel:(id)unused;

- (void)setUseLED:(id)value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NSNumber *


- (id)canShow:(id)unused
{
return NUMBOOL([MTBBarcodeScanner cameraIsPresent] && ![MTBBarcodeScanner scanningIsProhibited]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I start moving to @(value) instead of NUM***.

withObject:@{
@"message" : [error localizedDescription] ?: @"Unknown error occurred."
}];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks weird. Did you format this?


selectedLEDMode = [TiUtils boolValue:value def:YES] ? MTBTorchModeOn : MTBTorchModeOff;

if (barcodeViewController) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please always compare against nil, since barcodeViewController is not a boolean.

[self replaceValue:value forKey:@"useFrontCamera" notification:NO];

selectedCamera = [TiUtils boolValue:value def:YES] ? MTBCameraFront : MTBCameraBack;
NSError *cameraError;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialize with nil

{
ENSURE_SINGLE_ARG(args, NSDictionary);

id blob = [args valueForKey:@"image"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to prevent id whereever possible. Use TiBlob for this case and change all other id's if possible as well.

@hansemannn hansemannn changed the title [MOD-2354] : Zinngwidget library replaced with AVFoundation framework [MOD-2354] : Replace XZing library with AVFoundation framework Jul 31, 2018
@hansemannn hansemannn added this to the ios-2.0.0 milestone Jul 31, 2018
@vijaysingh-axway
Copy link
Contributor Author

@hansemannn Addressed the comments. Please review. Thanks!

@hansemannn hansemannn merged commit c087ade into tidev:master Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants