I'm running automated application unit tests under a C.I. environment for iPhone apps and everything works fine using a command line such as;
xcodebuild -scheme "Tests" -configuration Debug -sdk iphonesimulator5.0
That's great, but I now want to force the iPhone simulator to launch in Retina mode, rather than the default standard mode.
I know I can toggle this with the hardware menu option, however I'm running this on a headless integration server so don't have that option.
What I'd like to do is pass a switch somehow on the command line that tells the simulator to launch in Retina mode.
I optimistically tried appending SimulateDevice="iPhone (Retina)" to the xcodebuild command, but that seems not to work.
Is this possible? I can't seem to find a way at the moment.
If it's not possible, is there an alternative approach I can take?
Another approach looks like;
defaults write com.apple.iphonesimulator "SimulateDevice" '"iPhone (Retina)"'
However as with the applescript approach from sch, this doesn't seem to be quite working when used as part of the build phase. Still investigating ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With