Xcode WTF are you doing?!

Uncategorized No Comments »

I didn’t start developing in Xcode “for real” until this year but I’ve played around with Xcode for a number of years.  Over that time, I’ve screwed around with settings and changed defaults.  It got to the point where following screen shot examples weren’t matching up, #pramga marks in my code weren’t showing up correctly in the code editor method drop down list and on and on.  Perusing through Xcode Workspace Guide, I found this handy little suggestion from Apple:
To reset Xcode to its factory settings for the logged-in user, run these commands in Terminal:

> defaults delete com.apple.Xcode
> rm -rf ~/Library/Application\ Support/Xcode

After doing this, I had to re-add my Subversion repository, move my build folder to the /tmp directory, and pick my text editor color scheme again.  However, I now have a functioning Xcode and things seems happier again.  Yippy skippy!

Xcode 3.2.1

Uncategorized No Comments »

Xcode 3.2.1 was released today and is available for download with iPhone SDK 3.1.2. This release is mainly a bug fix release and I’ve confirmed it does fix the Unit Testing issue I reported earlier.

Xcode & Snow Leopard – Logical unit tests hanging

Uncategorized 1 Comment »

I haven’t written unit tests before in Xcode.  I started to read Apple’s article on unit testing with iPhone development because I wanted to follow sound development principles with an agile approach.  Not long into the guide, I got stuck.  Literally.  Using Xcode 3.2 on Snow Leopard caused Xcode to lock/hang during the build of the logical unit test.  Same results after iPhone SDK 3.1 came out.  I couldn’t find anything online either except a few people experiencing the same issue.  In the system console (not Xcode console) I was seeing:

9/18/09 8:35:29 PM Xcode[669] -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance 0x2009b7620
9/18/09 8:35:29 PM Xcode[669] -runOperationInBackground raised an exception: -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance 0x2009b7620

Xcode[669] -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance 0x2009b7620

Xcode[669] -runOperationInBackground raised an exception: -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance 0x2009b7620

Needless to say, I was losing my mind. Finally, a user in the Apple Developer forums, “cde”, posted the following gem:

We have recently discovered the root cause of this problem.

People who are affected can work around it by (I hope you’re ready for this)…

…changing the Time Zone on your Build machine away from Central Daylight Time.  (In six weeks you can change it back, and people in Mountain Standard TIme will be affected.)

No, seriously.  Give it a try.

The problem is a single-character typo in a regular expression that parses the date stamp of the unit test. It causes it to miss the beginning of unit tests that are executed at -0500 or +0500 relative to GMT, so the end of those unit tests is unexpected, and it causes the build log parsing logic to initially hang and eventually crash.

As has been said, “Then I decided to use regular expressions, and I had two problems…”

So until it’s fixed, change your timezone to Pacific time.

Xcode SCM & build directory

Uncategorized No Comments »

Xcode has a build directory inside of your project, which you shouldn’t be including in your source code management repository.  Simply said, those files change so much and are “discardable”.  There is no way to easily exclude this directory from your repository.  The accepted way to fix this (after some digging) is to simply move the build directory for Xcode to a temporary folder.

To move the build directory, click on the Xcode menu in your menu bar, and click on Preferences.  Change the folder under “Building” to a temporary folder.  I created a tmp directory in my user folder.

Xcode Preferences Build

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in