Tags: iOS, unit testing, xcode, xcode4
We receive a decent amount of traffic from a post I wrote 18 months ago in which we described how to trick Xcode 4.x into running your application unit tests from the command line.
Unfortunately, as of Xcode 4.5, this trick appears to be broken. You’ll get this error message when you run your tests:
Unknown Device Type. Using UIUserInterfaceIdiomPad based on screen size
Terminating since there is no workspace.
(For more details, see this StackOverflow post regarding Xcode 4.5 command line unit testing.)
Worse yet, if you’re like us and using command line unit testing in a CI (=Jenkins) environment, you probably didn’t even notice the failure at first, because the
xcodebuild command doesn’t fail — it completes successfully despite not running any of your tests (!).
Luckily, a gentleman named Scott Thompson on StackOverflow had found a way a few months prior (even to Xcode 4.5) to use
ios-sim to launch the iOS simulator with some arguments and environment variables to tell the simulator to running application unit tests, much in the way Xcode magically does when you press Command-U in the IDE.
The solution involves creating a new scheme for your tests, and then using a post-build script to run
ios-sim with the right flags. There’s no point to reproduce the solution here, as the SO answer is well-written and clear:
Best of luck, and thanks Scott and Pawel!
In addition to being a Long Weekender, I work for a great company in Tokyo called Moneytree. Last weekend I gave […]
Reading Chinese on your iPhone Just Got Easier Makers of popular language study applications Rikai Browser and Chinese Flash release […]
In partnership with Swinburne University of Technology in 2011 we ran a variety of courses teaching software development for the […]
Rikai Browser, the easy way to read Japanese websites on your iPhone & iPad, has just been updated. In this […]
We recently launched Juliette & The Shiny Red Ballon, our first iPad children’s book. As we pointed out, it also […]
Long Weekend and the Tyler Foundation recently announced the release of Juliette and the Shiny Red Balloon, a bedtime storybook for iPad presented in English […]
TOKYO – The Tyler Foundation, a charity supporting children with cancer and their families, has a new venue for fundraising: […]
We consider Japanese Flash and Chinese Flash to be pretty mature products: most of the code has been developed over […]
TOKYO – Jan 9, 2012 – Chinese Flash, a new tool for studying Chinese vocabulary, launched today on the Apple […]
In our language learning products Japanese Flash & Chinese Flash, we have quite large sql files. This puts us over […]
older posts >