0

我正在尝试更新Sphero PhoneGap 插件以使用最新的 Cordova 3.4.1 和 XCode 5.1。

如果我在 XCode 中运行它,构建工作正常。在构建设置中,我已将“有效架构”指定为armv7armv7s.

但是如果我cordova build --device ios在命令行上做,那么我得到:

Running command: /Users/peteshau/dev/src/pearson/prototypes/robots-sphero/phonegap-test/platforms/ios/cordova/build --device
Build settings from command line:
    ARCHS = armv7 armv7s arm64
    CONFIGURATION_BUILD_DIR = /Users/peteshau/dev/src/pearson/prototypes/robots-sphero/phonegap-test/platforms/ios/build/device
    SDKROOT = iphoneos7.1
    VALID_ARCHS = armv7 armv7s arm64

...

ld: warning: ignoring file RobotsSphero/Plugins/com.orbotix.sphero.SpheroPlugin/RobotKit.framework/RobotKit, missing required architecture arm64 in file RobotsSphero/Plugins/com.orbotix.sphero.SpheroPlugin/RobotKit.framework/RobotKit (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RKRobotProvider", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKRawMotorValuesCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKPingCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKStabilizationCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKRollCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKCalibrateCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKBackLEDOutputCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKGoToSleepCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_OBJC_CLASS_$_RKRGBLEDOutputCommand", referenced from:
      objc-class-ref in spheroGap.o
  "_RKDeviceConnectionOnlineNotification", referenced from:
      -[spheroGap setupRobot] in spheroGap.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

(同样的错误,cordova run --device它无法启动)。

我正在尝试为运行 iOS 7.1 的 iPhone 5S 构建它。

根据我有限的理解(我对 iOS 开发非常不熟悉),看起来 Cordova 忽略了构建设置中指定的有效架构限制?有没有办法可以告诉它省略arm64以便让它运行?

(如果相关,本机“RobotKit”框架似乎需要将部署目标设置为 6.0并设置各种链接器标志。从命令行输出来看,它似乎正在使用指定的链接器标志确定)。

4

1 回答 1

0

这是 Cordova 已确认的“缺陷”:

https://issues.apache.org/jira/browse/CB-6716

我现在可以通过将“仅构建活动架构”更改为“是”来解决它。

于 2014-05-29T08:54:58.373 回答