Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
fixes #162 button bar not working in ios8
Browse files Browse the repository at this point in the history
  • Loading branch information
basvanbeek authored and Ryan Willoughby committed Mar 30, 2015
1 parent c2dcd87 commit a1f216d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ios/CDVBarcodeScanner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,10 @@ - (void)barcodeScanDone {

//--------------------------------------------------------------------------
- (void)barcodeScanSucceeded:(NSString*)text format:(NSString*)format {
[self barcodeScanDone];
[self.plugin returnSuccess:text format:format cancelled:FALSE flipped:FALSE callback:self.callback];
dispatch_sync(dispatch_get_main_queue(), ^{
[self barcodeScanDone];
[self.plugin returnSuccess:text format:format cancelled:FALSE flipped:FALSE callback:self.callback];
});
}

//--------------------------------------------------------------------------
Expand Down Expand Up @@ -343,7 +345,7 @@ - (NSString*)setUpCaptureSession {
output.alwaysDiscardsLateVideoFrames = YES;
output.videoSettings = videoOutputSettings;

[output setSampleBufferDelegate:self queue:dispatch_get_main_queue()];
[output setSampleBufferDelegate:self queue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0)];

if (![captureSession canSetSessionPreset:AVCaptureSessionPresetMedium]) {
return @"unable to preset medium quality video capture";
Expand Down

0 comments on commit a1f216d

Please sign in to comment.