Launch a specific Hardware version of iOS simulator using instruments command line utility
Since Xcode 5.1 Instruments supports specifying the simulator hardware type and iOS version from the command line.
instruments -w help
The command above will give you a list about the available hardvare-iOS combinations. On my machine thats are:
iPhone - Simulator - iOS 6.1iPhone - Simulator - iOS 7.1iPhone Retina (3.5-inch) - Simulator - iOS 6.1iPhone Retina (3.5-inch) - Simulator - iOS 7.1iPhone Retina (4-inch) - Simulator - iOS 6.1iPhone Retina (4-inch) - Simulator - iOS 7.1iPhone Retina (4-inch 64-bit) - Simulator - iOS 6.1iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1iPad - Simulator - iOS 6.1iPad - Simulator - iOS 7.1iPad Retina - Simulator - iOS 6.1iPad Retina - Simulator - iOS 7.1iPad Retina (64-bit) - Simulator - iOS 6.1iPad Retina (64-bit) - Simulator - iOS 7.1
You can specify the hardware and iOS version also with -w flag. Example:
instruments -w "iPad Retina - Simulator - iOS 7.1" -t ...
Note that -w flag must come at the start of the command line, before any other flags, otherwise you get strange errors.
I have found this information at:http://cocoamanifest.net/articles/2014/03/ui-screen-shooter-now-simpler-and-more-robust-since-xcode-5-1.html
Using Instruments 5.0 (relate to Xcode 5.0):
- click the small "i" icon to the right of "Automation" in the upperleft part of the window
- underneath "Target", click on the name ofyour app
- in the pop-up menu, select "Edit Active Target" in thepop-up window,
- click the "Options" menu, and underneath "SimulatorConfiguration" select the device to simulate and iOS version.
If you don't see a particular iOS version, then you need to add that simulator in Xcode:
- Xcode menu, Preferences...
- Downloads tab
- Click the down-arrow nextto the version of iOS simulator you want to install
PS: I created some awesome screenshots, but stackoverflow won't let me post them. boo.
Have you tried iOS-Sim https://github.com/phonegap/ios-sim ? This gives you some extra options when working with the simulator from cmd. The Version is one of these.