I’ve tired a couple of frameworks and tried to follow several steps found on Google. So far nothing is doing the trick.
My latest effort followed instructions for using OCUnit written by Sen:te. After following the steps outlined, I get this error when compiling and running the project:
error: Testing rig /Somepath/iPhoneSDKVersion/otest exited abnormally with code 139 (it may have crashed).
Naturally I turned to trusty Google which came up with nothing helpful.
Thinking that it was a failure to follow the directions, I downloaded the sample test application, loaded the project in Xcode, then built and ran the project. Same error.
I tweeted to Michael Galpin, a programmer at eBay, asking for any ideas on unit testing iPhone apps. Since he had just given two presentations on mobile development [1, 2] for the Silicon Valley Code Camp 09, I thought he might have some ideas.
His initial response does not give me good feelings about iPhone development:
I’ve only seen homebrewed stuff. XCode is not exactly extensible.
He did turn me to the google-toolbox-for-mac which has some promising instructions on doing iPhone unit testing.
What bothers me about doing iPhone development is that I am leaving all my very excellent development tools for iffy tools.
Sun wants Java on the iPhone and is willing to make it happen. Java has one hell of a community behind it and Apple could really benefit from it.
Unfortunately someone at Apple has some bad information on Java.
This was not really meant to turn this into a bit of an Apple hate-fest. It’s just that the tools and community that Java has is light years ahead of what Apple is offering anyone interested in iPhone app development.
When I’m effectively boxed into Xcode to do iPhone development, that’s a problem. I would like an IDE that doesn’t seem to break at least one thing every update. Chris Hanson’s steps to setting up unit tests has required updating between various Xcode updates.
More importantly, the barrier to entry for unit testing iPhone apps is painfully high. I have almost given up and I’m already sold on the idea of unit testing. Imagine if I wasn’t already sold.
google-toolbox-for-mac is next up for me to try. Wish me luck, I’ll need it.