gpt4 book ai didi

ios - 在 Cordova 2.0 中找不到适用于 ios 条码扫描器插件的插件 'org.apache.cordova.barcodeScanner'

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:14:06 24 4
gpt4 key购买 nike

我正在尝试为 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com