ios - Cordova 2.0 中的 ios 条形码扫描仪插件未找到插件 'org.apache.cordova.barcodeScanner'

标签 ios cordova barcode-scanner

我正在尝试扫描ios当前项目中的条形码。为此,我使用了 Phone Gap 插件。我按照链接正确添加了文件:Barcode Link

我在项目的 www 文件夹中添加了 Barcodescanner.js 文件。但是当我按下按钮扫描 ipad 2 中的条形码时,出现以下错误:

  ERROR: Plugin 
'org.apache.cordova.barcodeScanner' not found, or is not a CDVPlugin. 
Check your plugin mapping in Cordova.plist

似乎没有获取 barcodescanner.js 文件的正确路径。我也正确地在index.html 文件中添加了路径。

有人可以帮忙吗?

最佳答案

阿林达姆,

我现在可以使用了。我做了什么

  1. 像在 link 中那样更改 Cordova.plist 中的 key
  2. 按照上述同一链接中的操作更改 Barcodescanner.js 的代码
  3. 不仅将 .cpp 、 .h 和 .mm 文件添加到我的工作区目录中的文件夹中,还将它们添加到我的 xcode 项目中:

Right Click on "Plugins" -> Add Files To projectname -> Select the .cpp , .h and .mm file from my Plugins folder in the project Directory -> Set "Create Folder references for any added folders" and "add to Target projectname" -> Click "Add"

将文件添加到我的项目后,扫描仪开始工作。

希望这也能解决你的问题。我正在使用 Cordova 1.8.1。

关于ios - Cordova 2.0 中的 ios 条形码扫描仪插件未找到插件 'org.apache.cordova.barcodeScanner',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12052142/

相关文章:

java - zxing 运行时异常到 android 应用程序

ios - 使用 Cordova 2.2.0 将 AdMob 实现到 IOS

ios - 在用户键入 iOS 时检查用户名可用性

iphone - UIFont 大小 : half point sizes possible?

java - Android PhoneGap 插件,UI 标签栏,调整 WebView 大小

android - ZXing Android 生成一维条码

ios - 了解我的 iPhone 应用程序崩溃日志

android - 为各种 Android 操作系统版本设置推送通知图标

android - 在 cordova android 的状态栏中显示多个推送通知

java - 无法配置 EMDK 版本 7.4.0