Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching RETINA simulator from Xcodebuild for continuous integration

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?

like image 318
Roger Avatar asked Dec 28 '22 04:12

Roger


1 Answers

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 ...

like image 128
Roger Avatar answered Dec 29 '22 19:12

Roger