I’ve got some UI Automation tests for a universal app that I’m running from the command line. They are working great, but the command line always launches the iPad simulator, and I’d like to be able to run them on both the iPhone simulator and the iPad simulator.
In Instruments I can control this with with the Options|Simulator Configuration menu, but I can’t seem to control it via the command line. Is there a way to run UI Automation tests from the command line for a universal app against both the iPad and iPhone simulators?
Make a separate target (i.e. another version of your app) which is iPhone-only, this will force instruments to use the iPhone simulator, rather than iPad.
In other words, in your new target’s config, set
TARGETED_DEVICE_FAMILY = 1.