Here’s my current workaround:
- Use
xcrun simctl boot "iPhone 8"
to pre-boot the simulator, rather than using Instruments. - Grab hold of the first simulator ID into an enviroment variable:
SIMULATOR_ID=`xcrun instruments -s devices | grep -m 1 "iPhone 8 (12.0)" | cut -d "[" -f 2 | cut -d "]" -f 1
- Use the env variable in the xcode test command:
-destination "platform=iOS Simulator,OS=latest,id=$SIMULATOR_ID"