nativescript-barcodescanner
Advanced tools
Comparing version 2.7.6 to 2.7.7
@@ -5,3 +5,2 @@ "use strict"; | ||
var utils = require("tns-core-modules/utils/utils"); | ||
var frame = require("tns-core-modules/ui/frame"); | ||
var BarcodeScannerView = /** @class */ (function (_super) { | ||
@@ -201,13 +200,8 @@ __extends(BarcodeScannerView, _super); | ||
} | ||
var topMostFrame = frame.topmost(); | ||
if (topMostFrame) { | ||
var vc = topMostFrame.currentPage && topMostFrame.currentPage.ios; | ||
if (vc) { | ||
vc.presentViewControllerAnimatedCompletion(_this._scanner, true, function () { | ||
if (arg.torchOn) { | ||
_this._enableTorch(); | ||
} | ||
}); | ||
var app_2 = utils.ios.getter(UIApplication, UIApplication.sharedApplication); | ||
app_2.keyWindow.rootViewController.presentViewControllerAnimatedCompletion(_this._scanner, true, function () { | ||
if (arg.torchOn) { | ||
_this._enableTorch(); | ||
} | ||
} | ||
}); | ||
} | ||
@@ -314,4 +308,4 @@ catch (ex) { | ||
validResult = true; | ||
var app_2 = utils.ios.getter(UIApplication, UIApplication.sharedApplication); | ||
app_2.keyWindow.rootViewController.dismissViewControllerAnimatedCompletion(true, null); | ||
var app_3 = utils.ios.getter(UIApplication, UIApplication.sharedApplication); | ||
app_3.keyWindow.rootViewController.dismissViewControllerAnimatedCompletion(true, null); | ||
this._callback(result, type); | ||
@@ -318,0 +312,0 @@ } |
{ | ||
"name": "nativescript-barcodescanner", | ||
"version": "2.7.6", | ||
"version": "2.7.7", | ||
"description": "Scan QR/barcodes with your NativeScript app.", | ||
@@ -5,0 +5,0 @@ "main": "barcodescanner", |
@@ -17,5 +17,8 @@ # NativeScript BarcodeScanner | ||
#### Want a quick demo? | ||
* git clone https://github.com/EddyVerbruggen/nativescript-barcodescanner barcodedemo | ||
* cd src | ||
* npm run demo.android (or demo.ios / demo.ios.device) | ||
``` | ||
git clone https://github.com/EddyVerbruggen/nativescript-barcodescanner barcodedemo | ||
cd barcodedemo/src | ||
npm install | ||
npm run demo.android (or demo.ios / demo.ios.device) | ||
``` | ||
@@ -51,2 +54,4 @@ ## Supported barcode types | ||
> If you need to embed the scanner for Android as well, please consider using the Machine Learning powered Barcode scanner I've added to the [ML Kit feature of the NativeScript Firebase plugin](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/ML_KIT.md#barcode-scanning)! | ||
<img src="docs/ios_embedded_scanner.png" width="281px"/> | ||
@@ -53,0 +58,0 @@ |
335
1707936
26
771