ios - Apache Cordova - 不要构建 i386 架构

标签 ios objective-c xcode cordova cordova-3

我在构建时遇到错误(使用 cordova 3.4):

Undefined symbols for architecture i386:
  "_iconv", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
  "_iconv_close", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
  "_iconv_open", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

我很确定这来自手机间隙 QR 扫描仪插件,但我认为它根本不应该构建 i386。二维码扫描器似乎没有那种架构的库。

我如何告诉 cordova 不要构建 i386?还是我错过了什么?

最佳答案

构建时,您可以指定要执行的构建类型:

cordova compile --device

或者对于 i386:

cordova compile --emulator

这就是为我修复它的原因。

关于ios - Apache Cordova - 不要构建 i386 架构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22948917/

相关文章:

ios - 网站上的Apple PassKit Wallet下载链接

ipad - 自动续订订阅发生未知错误

ios - 无法使用带有 NSLocationWhenInUseUsageDescription 的 Swift 和 iOS8 获取位置服务

objective-c - 升级到 iOS8 后定位服务错误

iphone - 联合数组的 NSArray

ios - 为什么 Xcode/Swift 坚持要求我对 Delegate 和 Data Source 方法使用 override 关键字?

ios - 记录方法正在哪个队列/线程上运行

ios - UIImageView Aspect Fill 不填充 View

ios - Swift:使用 slider 修改图像 - 并隔离以优化 CIImage?

ios - 带有overlayskscene Xcode Swift 的屏幕触摸Scenekit 导致应用程序崩溃