I am using UIAutomation provided by Apple -> Xcode -> instruments. I have my Javascripts and the whole automation using instruments command line infrastructure running up.
I got an additional task of running automation on previous versions of simulator (iOS 6.0 , 5.1, 5.0, 4.3.2) to provide better coverage.
But i do not know a way to specify which version of iOS simulator to choose from. by default it always chooses the lates iOS simulator.
I have tried the following things:
- Specifying the path where the simulator is kept which includes the version path of simulator.
- Making a custom Automation template trace and trying to use it.
- Changed the default version of iOS simulator using defaults write com.apple.simulator utility.
Using Instruments 5.0 (relate to Xcode 5.0):
If you don't see a particular iOS version, then you need to add that simulator in Xcode:
PS: I created some awesome screenshots, but stackoverflow won't let me post them. boo.
Since Xcode 5.1 Instruments supports specifying the simulator hardware type and iOS version from the command line.
The command above will give you a list about the available hardvare-iOS combinations. On my machine thats are:
You can specify the hardware and iOS version also with -w flag. Example:
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
tried something like this?
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.
If you can select it on the UI, you should be able to achieve the same result using applescript. This is an example of how to change the Device on applescript: https://gist.github.com/Reflejo/9537281