Xcode 5.1 & iOS


If you have recently updated to Xcode 5.1 and having build issues, this post may help:


Did this help you with any issues you had? I updated to 5.1 and didn’t really have any issues with my Xcode and my projects.

Did you create the cordova project from any version prior to the launch of iOS 7?


If you didn’t have any issues, you must not have a 64-bit device. Cordova 3.4 fails to build for arm64 due to a few issues mentioned in that thread. Compiling for iOS 7 works for non-64-bit devices, so basically it fails only on the iPhone 5S, which is my main phone.


@jough Will the testing in general fail on a 64bit device? Or will the app itself fail?

For instance, I don’t own an iPhone 5S and thus my testing seems to be without any issues. I could go ahead and publish my app in de App Store and then a 5S user downloads my app and it fails instantly?


I can’t even get a brand new project to work unless I call it “helloWorld”. Call it “helloWorld” and builds, compiles, runs on iOS 6 & 7 simulators and devices. If I name it anything related to my app, it craps out. Won’t run on simulator, gets compile errors, CDVViewController errors. What a mess.

So, Kids In Touch is now going to be called “Hello World”.

I’m going nuclear and wiping my whole system with a clean upgrade to Mavericks. Be back online in tomorrow probably.


Wauw… that’s quite dramatic. But most of the times a sure fix for this kind of issues.

Be aware of the nuclear fallout; this may render your machine useless for years


@jough yeah I only have and iPhone 5 and a few iPads for actual testing, no 5s unfortunately so I didn’t know there would be an issue. Thanks for the heads up!

@Robin good question, I guess the only way to know is to actually try to run it on the device. If you guys have one, let us know how it goes.

@Calendee, oh boy, thats a world of hurt right there. What version of cordova were you using though? Just curious because the time I’m getting the build failures is if I target the 64-bit platform, as mentioned above.


@Robin I haven’t tried this myself, but I believe your app would simply be rejected because it fails automated tests that App Store reviewers run on your app before it gets approved. You can target older SDKs, but not set an upper ceiling for newer devices when submitting your app to the store (e.g. you can target iOS 5.0 but not iOS < 7.0, etc.). If it’s already in the store and doesn’t work on newer devices eventually it’ll trigger a removal too.


It’s really bad and I have no idea what I am doing >.<

I updated phonegap & cordova, recompiled my application, followed every step of the tutorial but here you go (it works in Emulator, but not on actual device):


Just suffered through all that myself. What version of Cordova do you have. If < 3.4, I couldn’t get any of that to work.

Try this :

Close Xcode.
Replace the 2 files suggested.
run cordova build ios
Open Xcode, update the Architecture as suggested . Try to build

To be honest, NONE of that worked for me. I “think” Xcode was tying into previous builds of my app “com.calendee.kidsintouch” and could not do any updates. I even deleted the Xcode derived data ( ~/Library/Developer/Xcode/DerivedData).

In the end, I needed to upgrade to Mavericks with a clean install for other reasons; so, I just went for it.

Now, I’m able to properly build in Xcode. You may not want to go to that extreme, but I couldn’t find anything else that worked.

To test this theory do the following:

cordova create hello com.example.hello HelloWorld
cordova platform add ios
Now replace those 2 files
cordova build ios
Now, open Xcode and edit architecture settings.
Try to run in simulator

If that works, then the problem is with the existing app and I don’t know how to fix it.


It does not work on iPhone 5s & 64bit Sim
it works in a regular sim (32bit I guess) and probably will work on iphone 5 and 4s.
it also does not open config.xml (it’s red in the file manager)

Maybe it makes sense to downgrade and wait for this all to blow over :slight_smile:

Edit 2.

Somehow I made it to work on my device (apparently I was not following the tutorial - the step about Targets & Project made me confused - I dont know the UI of xcode well yet) but config.xml is still being ignored so I cant get some plugins to work.