xcode 5.1: libCordova.a architecture problems
@Shazron posted the fix on the Apache JIRA - he notes that the fix will be released as part of Cordova 3.5:
- Select your Project icon
- Choose Build Settings.
- For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
- For "Valid Architectures", add "arm64"
- Select your CordovaLib.xcodeproj icon
- In the Build Settings for the Project (not Target), delete the conditional architecture settings (hover to see the minus sign)
- For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
- For "Valid Architectures", add "arm64"
- Goto 6, but now do it for "Target"
Here's a link to Shazron's complete writeup of this problem: http://shazronatadobe.wordpress.com/2014/03/12/xcode-5-1-and-cordova-ios/
It is now released and the short version of what to do is:
Cordova CLI 3.4.1-0.1.0 is out, which includes Cordova iOS 3.4.1 which incorporates all the fixes mentioned in this blog post. Update your Cordova CLI, and if you have an existing project, do a “cordova platform update ios“.
Another approach that works:
- Click on your project at the top of the project navigator (not the Cordova.lib subproject).
- In the editor pane, select the project (not the target), select the Build Settings editor tab, and click the All and Levels buttons.
- Expand the Architectures group if necessary and find the Architectures row under it.
- The first (resolved) and third (iOS Default) columns in the Architecture row will say Standard; the second (project) column will be blank.
- Click on the blank second column to bring up a box that will have one line, “$(ARCHS_STANDARD)”.
- Double-click that line to make it editable, then change it to read “$(ARCHS_STANDARD_32_BIT)”.
- Click outside the box to confirm your change. Now the first and second boxes will just have a $ in them.
- Now you should be able to build.
Downgrade Xcode 5.1 to 5.0.2 worked for me, I could not wait for an official Cordova 3.5 release with the fix.
You can get a copy of the previous version here: https://developer.apple.com/downloads/index.action