
Update: Appcelerator’s official recommendation dated March 16th is to either downgrade to Xcode v.4.2.1 or living on the edge with Xcode 4.3 (via Mitch Amihod)
Tried to deploy a default Titanium app targeting the iPhone iOS 4.2 onto a physical device with iOS 5.1 installed. As you could probably guess, the app installed on the device as expected but when launched, it would crash after the splash screen.
The trouble is that I had the iOS 4.2 SDK installed. I tried to install the IOS 5.1 SDK, but unfortunately Titanium Studio would only recognize the iOS 3.0, 4.0, 4.1 and 4.2 SDKs. I tried to re-target Titanium Studio to recognize the iOS 5.1 SDK, but to no avail – iOS 5.1 would not show up as an option no matter what. After doing some digging around, I found a file called builder.py in the Titanium Studio application path that had a command called -showsdks (at line 50) which provides the Titanium Studio IDE with the list of targetable platforms. For example:
I typed in the command in Terminal and got the following result:
Mac OS X 10.5 -sdk macosx10.5
Mac OS X 10.6 -sdk macosx10.6
iOS SDKs:
iOS 4.2 -sdk iphoneos4.2
iOS Simulator SDKs
Simulator - iOS 3.2 -sdk iphonesimulator3.2
Simulator - iOS 4.0 -sdk iphonesimulator4.0
Simulator - iOS 4.1 -sdk iphonesimulator4.1
Simulator - iOS 4.2 -sdk iphonesimulator4.2
After a few hours of troubleshooting, I discovered the trick was to pretty much uninstall all previous versions of Xcode. The command to do this is:
Then when you open Titanium Studio, the following message appears:

I decided to install the following components:
- Xcode 4.2 for Lion (build 4D199 with the iOS 5 SDK Gold Master build) which was the recommended build by the Titanium team – available at the following link (requires an iOS Developer Program account): https://developer.apple.com/downloads/index.action#. After the install, the iOS 5.0 SDK came up as an target option in the Titanium Studio IDE (and via xcodebuild -showsdks)
- Appcelerator 1.7.6 Mobile SDK – found on the continuous builds website (http://builds.appcelerator.com.s3.amazonaws.com). The later 1.7.x builds are recommended for use with the iOS 5+ SDKs. To install the mobile SDK, simply click on the Help > Install Titanium SDK from URL option within the Titanium Studio IDE. The URL I used was: http://builds.appcelerator.com.s3.amazonaws.com/mobile/1_7_X/mobilesdk-1.7.6.v20120320183239-osx.zip
To test out the new install (and crossing my fingers), I created a new blank Titanium mobile project targeting the Appcelerator 1.7.6 SDK. When deploying the app to my iPhone, I selected the iOS 5 SDK as a compile target. The app deployed to my phone, and lo and behold, it worked! Hope the instructions are helpful for you too.
If you want clarity on what Xcode version contains what iOS SDK version (which can get quite convoluted when you try to explain it out loud), here is a Wikipedia entry to hopefully help clear things up: http://en.wikipedia.org/wiki/IOS_SDK



No Comments
Trackbacks/Pingbacks