Last Updated: February 25, 2016
·
2K
· csquirrel

iOS Simulator: Change 'hardware' using command line

You may need to force specific hardware to be simulated for your application (e.g. continuous integration). There's easy way to do it in the command line:

$> defaults write com.apple.iphonesimulator \
    "SimulateDevice" '"iPhone (Retina)"'

This will make iPhone Retina the default hardware.

Note: Simulator application has to be restarted for the change to take place. Relaunching iOS application via Xcode is not enough.