Я создал ионное приложение, это хорошо работает на android. Но сканер штрих-кода не работает корректно в ios.Ionic BarcodeScanner не работает на ios
Мой код;
$cordovaBarcodeScanner.scan().then(function (barcodeData) {
console.log("Data : "+barcodeData.text);
});
Но XCODE дает мне что-то подобное в качестве нон-стоп;
Когда я попытался это сделать;
cordova.plugins.barcodeScanner.scan(
function (result) {
alert("We got a barcode\n" +
"Result: " + result.text + "\n" +
"Format: " + result.format + "\n" +
"Cancelled: " + result.cancelled);
},
function (error) {
alert("Scanning failed: " + error);
},
{
"preferFrontCamera" : true, // iOS and Android
"showFlipCameraButton" : true, // iOS and Android
"prompt" : "Place a barcode inside the scan area", // supported on Android only
"formats" : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
"orientation" : "landscape" // Android only (portrait|landscape), default unset so it rotates with the device
}
};
получаю эту ошибку:
Warning: Attempt to present <CDVbcsViewController: 0x15f30c400> on <MainViewController: 0x15dd4fab0> whose view is not in the window hierarchy!
еще не решена. пожалуйста помоги ? –