xcodebuild does not launch iOS 7.0 simulator

ios, ios-simulator, xcode5, xcodebuild

Solution

You’re almost there:

The `-destination` parameter is special, in that you cannot quote the part that comes after the “=” sign.

Meaning this:

xcodebuild \
    -workspace Project.xcworkspace \
    -scheme 'Test Smoke' \
    -sdk iphonesimulator7.0 \
    -destination platform='iOS Simulator',OS=7.0,name='iPhone Retina (4-inch)' \
    clean test

will work.

Note that the commas between the options within the `-destination` parameter must immediately be followed by the next option.

Also note that — if you specified a `name` that doesn’t match anything that actually exists — this command will just hang.

Problem

I am trying to run our test suite with the iOS 7 simulator but `xcodebuild` always starts the 6.1 simulator. ``` xcodebuild -workspace Project.xcworkspace -scheme 'Test Smoke' -sdk iphonesimulator7.0 -destination="platform='iOS Simulator',OS=7.0,name='iPhone Retina (4-inch)’" clean test ``` It works if I deinstall the iOS 6.0 and 6.1 simulator but this is not an option.

Original source