XCode 5.1/iOS7.1 requires upgrade and patch to Cordova

I discovered yesterday that Cordova doesn’t play too nicely when you upgrade XCode to 5.1 so you can deploy to iOS 7.1 devices.

That said there are several steps that you need to follow in order to get Cordova working again in 5.1 prior to the Cordova 3.5.0 update being released:

  1. Update your local version of cordova using: npm install -g cordova (this should upgrade you to 3.4 if you were on a previous release, which I was on 3.3.0)
  2. You then need to upgrade your version of Cordova for your projects by issuing cordova platform update [ios | android] (do each separately and any other platform you may be using)
  3. Once upgraded, you’ll want to add the diffs from this post. They’re basically patches for the time being until Cordova 3.5.0 is released. Thanks much to @shazron for these!
  4. After that you can follow these directions from Shazron to ensure you have XCode configured properly. It’s very important you remove ALL these extra settings (e.g. Any iOS SDK, etc.) under Architectures->Debug (and Release) and add “arm64” to Valid Architectures for your CordovaLib project settings (then target) as follows:cordova-ios-71
  5. To get it working in Android you have to re-add the platforms/android/CordovaLib directory to be sure the new JAR is introduced into your project. I use IntelliJ so all you have to do is remove the old one under Project Structure and add the new lib.  Then add the resulting lib to your Android project and move it up to the top in your dependency list.

Hopefully this gets you up and running quickly again!


5 comments on “XCode 5.1/iOS7.1 requires upgrade and patch to Cordova

  1. Did you remove the extra debug/release configs shown in the pic above for both the project and the target CordovaLib build settings as well as your own project?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s