我在为 iPhone 上的 Phonegap 集成条形码扫描器插件时遇到了一些麻烦。我从这个 github 存储库获得了我的插件:
https://github.com/phonegap/phonegap-plugins/
我遵循了说明中的所有步骤,包括将所有相关源添加到项目的构建路径的步骤。我也关闭了自动引用计数。我认为每个文件都在正确的位置,但无论如何我都遇到了这个错误:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ALAssetsLibrary", referenced from:
objc-class-ref in CDVBarcodeScanner.o
"_CVPixelBufferGetBytesPerRow", referenced from:
-[CDVbcsProcessor getLuminanceSourceFromSample:imageBytes:] in CDVBarcodeScanner.o
-[CDVbcsProcessor getImageFromSample:] in CDVBarcodeScanner.o
"_CVPixelBufferUnlockBaseAddress", referenced from:
-[CDVbcsProcessor getLuminanceSourceFromSample:imageBytes:] in CDVBarcodeScanner.o
-[CDVbcsProcessor getImageFromSample:] in CDVBarcodeScanner.o
"_CVPixelBufferGetHeight", referenced from:
-[CDVbcsProcessor getLuminanceSourceFromSample:imageBytes:] in CDVBarcodeScanner.o
-[CDVbcsProcessor getImageFromSample:] in CDVBarcodeScanner.o
"_kCVPixelBufferPixelFormatTypeKey", referenced from:
-[CDVbcsProcessor setUpCaptureSession] in CDVBarcodeScanner.o
"_CVPixelBufferGetBaseAddress", referenced from:
-[CDVbcsProcessor getLuminanceSourceFromSample:imageBytes:] in CDVBarcodeScanner.o
-[CDVbcsProcessor getImageFromSample:] in CDVBarcodeScanner.o
"_CVPixelBufferLockBaseAddress", referenced from:
-[CDVbcsProcessor getLuminanceSourceFromSample:imageBytes:] in CDVBarcodeScanner.o
-[CDVbcsProcessor getImageFromSample:] in CDVBarcodeScanner.o
"_CVPixelBufferGetWidth", referenced from:
-[CDVbcsProcessor getLuminanceSourceFromSample:imageBytes:] in CDVBarcodeScanner.o
-[CDVbcsProcessor getImageFromSample:] in CDVBarcodeScanner.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
当我尝试插件的测试项目时,我努力将其部署到 iphone,但是当我按下“扫描”时,我收到一个错误,即缺少 cordova-1.7.0.js 文件。我正在使用 xcode 4,并且在 xCode 上安装了 cordova 1.7.0。在网上我找不到解决方案或类似问题。
有任何想法吗?