質問

I am attempting to update the Sphero PhoneGap plugin to work with the latest Cordova 3.4.1 and XCode 5.1.

The build works fine if I run it in XCode. In the Build Settings, I have specified "Valid Architectures" to just be armv7 and armv7s.

But if I do cordova build --device ios on the command line, then I get:

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 **

(Same errors with cordova run --device and it fails to launch).

I'm trying to build it for my iPhone 5S which is running iOS 7.1.

From my limited understanding (I'm pretty unfamiliar with iOS development), it looks like the Valid Architectures restriction specified in the Build Settings are being ignored by cordova? Is there a way I can tell it to omit arm64 so I can get it to run?

(In case it's relevant, the native "RobotKit" frameworks appear to require the Deployment Target being set to 6.0 and various Linker flags to be set. From the command line output, it appears to be using the specified Linker flags OK).

役に立ちましたか?

解決

This is a confirmed "deficiency" of Cordova:

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

I was able to get around it for now, by changing "Build Active Architecture Only" to "Yes".

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top