XCode and Rhodes Upgrading for iOS5
Posted by Jonathan | Posted in Mobile Connection, rhomobile, XCode | Posted on 24-10-2011
0
So I recently updated my iPhone to iOS5. Its a 3GS … so it was less than exciting to see the end result. Yea, there are some GUI enhancements, but nothing really worth the trouble its causing now. What trouble? When you build an app using XCode, and you want to deploy it to your iPhone for testing purposes, the OS on your phone MUST match the SDK on your system.
So I’m plugging along building and testing 2 apps in the simulator, they’re working great. I decided I’m to the point where I’d like to test them on my phone, so I fire up XCode (4.1 to something) and got a nice little message that said something like the Operating system on your device does not match the SDK version on this machine. Click here to revert the device … WHAT? Heck no. So that mean I now have to go through the pain of updaing XCode.
This has happened multiple times to me as I’ve progressed up through OS versions on my phone, so this time I figured I’d document it – so next time its not so much guess work, and it might help someone else too.
- Download XCode : Log into your developer account at http://developer.apple.com click downloads, and download the latest SDK version (4.2 includes iOS5 SDK)
- Install XCode. This can take a while, so grab a book or make a sandwich. DON’T listen to music on iTunes, because that’ll have to be closed during this upgrade.
If you’re developing with Rhodes (http://rhomobile.com) you might possibly have to upgrade this as well. Since you have your sandwich and a drink, you might as well.
Rhodes Upgrade (optional)
From a terminal prompt
- sudo gem update rhodes
- rhodes-setup
- set-rhodes-sdk (from your application’s root folder)
- rake clean:iphone
If you get an error like this -
=== CLEAN NATIVE TARGET rhorubylib OF PROJECT rhorubylib WITH CONFIGURATION Distribution === Check dependencies Unsupported compiler 'GCC 4.2' selected for architecture 'i386'
Welcome to the club.
It seems that XCode 4.2 removes the older 4.x simulators. I found this out when I opened XCode trying to debug the message above, and there was only iPhone Simulator 5.0 listed. So to fix the error above, you much edit your build.yml file and set these lines -
rake switch_app
Then from XCode you can choose your simulator and compile away for your simulator.
theCodeDog
