ios - cordova-barcodescanner-plugin 不适用于 iOS 设备

标签 ios cordova

我正在尝试在使用 PhoneGap Build 编译的 ionic 项目中使用 cordova-barcodescanner-plugin。

https://github.com/hypery2k/cordova-barcodescanner-plugin

当我尝试在 iOS 设备上使用条码扫描器时,我的应用程序正确打开条码但不扫描(捕获)二维码。

我的 config.xml 声明是 gap:plugin name="cordova-plugin-barcodescanner"source="npm"

我的测试代码是:

cordova.plugins.barcodeScanner.scan( 
function (result) { 
  if(result.cancelled) 
    return; 
  alert(result.text); 
}, 
function (error) { 
  alert("Error scan"); 
});

你有没有注意到同样的问题。

最佳答案

尝试使用官方插件。它有更好的支持。

https://github.com/phonegap/phonegap-plugin-barcodescanner

关于ios - cordova-barcodescanner-plugin 不适用于 iOS 设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35461797/

相关文章:

android - 媒体扫描仪android中的问题

ios - 谷歌分析 - 人口统计 - IDFA

ios - 如何检查我的 ios8 自定义键盘扩展是否具有开放访问权限?

ios - MVVM 并推送 ViewController : where to initialize the next ViewController and ViewModel, 并推送新 View ?

获取 IAP 产品响应后的 Objective-C 错误

android - android :name in AndroidManifest. xml中的空格

ios - 消息显示为空白?

iphone - 表格单元格指示器问题

ios - 如何发布依赖于关系的自定义核心数据属性的通知?

git - Cordova 从 config.xml 安装平台/插件