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.
Select a simulated device For iOS, tvOS, and watchOS apps, you can choose a simulated device, under [Platform] Simulators, from the run destination menu next to the scheme menu in the toolbar.
Just type this command in Terminal: open -a Simulator. app to launch the most recent simulator. Type this command in Terminal to run the Simulator rigth from the its folder.
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.
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