我正在尝试更新Sphero PhoneGap 插件以使用最新的 Cordova 3.4.1 和 XCode 5.1。
如果我在 XCode 中运行它,构建工作正常。在构建设置中,我已将“有效架构”指定为armv7
和armv7s
.
但是如果我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并设置各种链接器标志。从命令行输出来看,它似乎正在使用指定的链接器标志确定)。