Skip to content

Commit

Permalink
Merge pull request #104 from vineetchoudhary/development
Browse files Browse the repository at this point in the history
QR code crash fixes
  • Loading branch information
vineetchoudhary authored Apr 19, 2018
2 parents de63b7b + 8e0eb00 commit 6abc9d7
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 53 deletions.
6 changes: 0 additions & 6 deletions AppBox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
E101D2BE200DE7E00062078B /* xcpretty in CopyFiles */ = {isa = PBXBuildFile; fileRef = E101D22F200DE0170062078B /* xcpretty */; };
E10B821E1DF043EA00BBE0CD /* GetSchemeScript.sh in Resources */ = {isa = PBXBuildFile; fileRef = E172E13B1DEEB3B900405EF2 /* GetSchemeScript.sh */; };
E10B82221DF0498800BBE0CD /* TeamIDScript.sh in Resources */ = {isa = PBXBuildFile; fileRef = E10B82211DF0498600BBE0CD /* TeamIDScript.sh */; };
E114C46720872AA5008FC59C /* NSImage+Image.m in Sources */ = {isa = PBXBuildFile; fileRef = E114C46620872AA5008FC59C /* NSImage+Image.m */; };
E11633991E558635005EAB31 /* MobileProvision.m in Sources */ = {isa = PBXBuildFile; fileRef = E11633981E558635005EAB31 /* MobileProvision.m */; };
E119EF601E373C9B00A7798E /* ALAppStore.sh in Resources */ = {isa = PBXBuildFile; fileRef = E191F7C21E1E7B2A00D2A590 /* ALAppStore.sh */; };
E12E6D0A1D8FC77D0054814D /* DashboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E12E6D081D8FC77D0054814D /* DashboardViewController.m */; };
Expand Down Expand Up @@ -295,8 +294,6 @@
E101D25C200DE0170062078B /* version.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = version.rb; sourceTree = "<group>"; };
E101D25D200DE0170062078B /* xcpretty.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = xcpretty.rb; sourceTree = "<group>"; };
E10B82211DF0498600BBE0CD /* TeamIDScript.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = TeamIDScript.sh; sourceTree = "<group>"; };
E114C46520872AA5008FC59C /* NSImage+Image.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSImage+Image.h"; sourceTree = "<group>"; };
E114C46620872AA5008FC59C /* NSImage+Image.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSImage+Image.m"; sourceTree = "<group>"; };
E11633971E558635005EAB31 /* MobileProvision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobileProvision.h; sourceTree = "<group>"; };
E11633981E558635005EAB31 /* MobileProvision.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MobileProvision.m; sourceTree = "<group>"; };
E119EF5F1E3735EA00A7798E /* XCodePath.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = XCodePath.sh; sourceTree = "<group>"; };
Expand Down Expand Up @@ -478,8 +475,6 @@
DB1C84402079F54E007AC74C /* NSString+String.m */,
DB5385682083622A004BFC84 /* NSURL+URL.h */,
DB5385692083622A004BFC84 /* NSURL+URL.m */,
E114C46520872AA5008FC59C /* NSImage+Image.h */,
E114C46620872AA5008FC59C /* NSImage+Image.m */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -1496,7 +1491,6 @@
E16437D71D743A4E00CE8B7E /* main.m in Sources */,
DB831BCB1FF6B5780065B646 /* ABHudViewController.m in Sources */,
E1853392200E084500E88529 /* ABLog.m in Sources */,
E114C46720872AA5008FC59C /* NSImage+Image.m in Sources */,
E1902B481E16423200C3E0F6 /* ProjectAdvancedViewController.m in Sources */,
DBF290D71FA64A590046D5CE /* ProvisioningDetailsViewController.m in Sources */,
E16018F01DEC0BC200E3A377 /* DropboxViewController.m in Sources */,
Expand Down
1 change: 0 additions & 1 deletion AppBox/AppBoxPrefixHeader.pch
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@

#import "NSURL+URL.h"
#import "NSDate+Date.h"
#import "NSImage+Image.h"
#import "NSString+String.h"


Expand Down
15 changes: 0 additions & 15 deletions AppBox/Common/Extensions/NSImage+Image.h

This file was deleted.

26 changes: 0 additions & 26 deletions AppBox/Common/Extensions/NSImage+Image.m

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <ZXingObjC/ZXingObjC.h>

@interface QRCodeViewController : NSViewController{
IBOutlet NSImageView *imageViewQRCode;
__weak IBOutlet NSImageView *imageViewQRCode;
}

@property(nonatomic, strong) XCProject *project;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

#import "QRCodeViewController.h"

@implementation QRCodeViewController
@implementation QRCodeViewController{
}

- (void)viewDidLoad {
[super viewDidLoad];
Expand All @@ -28,8 +29,8 @@ - (void)viewDidLoad {
ZXMultiFormatWriter *writer = [ZXMultiFormatWriter writer];
ZXBitMatrix *result = [writer encode:url format:kBarcodeFormatQRCode width:250 height:250 error:&error];
if (result){
CGImageRef qrCodeImage = [[ZXImage imageWithMatrix:result] cgimage];
[imageViewQRCode setImage:[NSImage imageWithCGImage:qrCodeImage]];
NSImage *image = [[NSImage alloc] initWithCGImage:[[ZXImage imageWithMatrix:result] cgimage] size:NSMakeSize(250, 250)];
[imageViewQRCode setImage:image];
}else{
[Common showAlertWithTitle:@"Error" andMessage:error.localizedDescription];
}
Expand Down
1 change: 0 additions & 1 deletion AppBox/ViewController/Storyboard/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,6 @@ DQ
<string key="keyEquivalent" base64-UTF8="YES">
CA
</string>
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</buttonCell>
<connections>
<action selector="deleteBuildButtonTapped:" target="xJf-6e-3AH" id="Q6Y-pP-6BZ"/>
Expand Down

0 comments on commit 6abc9d7

Please sign in to comment.