Context: Running automated scripts using Xcode's UIAutomation with simulators 6.1 and 5.1 Xcode version is 4.6.1
Problem: When running a shell script from the Terminal, UIAutomation ALWAYS opens up 6.1, even though i've set the app path to 5.1.
I've tried building and running on 5.1, also if i run the test from Instruments, I'm able to choose the target for 5.1 and it works fine. The problem is only when i run it from the command line.
I checked the iphonesimulator.plist and the currentSDKRoot points to the 5.1 path, but as soon as the shell script runs, it changes to 6.1. Is there anyway I can force it to use 5.1?
After hours of searching (including the most apt one - Launch a specific Hardware version of iOS simulator using instruments command line utility) , there seems to be no solution to this.
There is a way to set the device using defaults write com.apple.iphonesimulator \ "SimulateDevice" '"iPad"' I need something like defaults write com.apple.iphonesimulator \ "Version" '"5.1"' though obviously that doesn't work.
Any pointers will be much appreciated. Thank You!
EDIT: I was hoping this would be resolved with XCode 5, but I still have the same issue and iOS7 simulator ALWAYS opens up! Btw,is there a way to circumvent this issue - I'm sure there are many out there running multiple simulator versions.