Starts an Xcode simulator.
It uses the xcrun simctl command to launch a simulator, and optionally wait for it to finish booting.
The simulator will be running in the background after the Step exits, and can be used by later Steps in the workflow.
It allows two use cases:
Boot simulator in the background and use it in the xcode-test Step:
- xcode-start-simulator:
inputs:
- destination: platform=iOS Simulator,name=iPhone 8,OS=latest
- xcode-test:
inputs:
- project_path: ./ios-sample/ios-sample.xcodeproj
- scheme: ios-sample
# Simulator
- destination: $BITRISE_XCODE_DESTINATION # Use the same destination as the xcode-start-simulator Step
Detect if simulator timed out and restart the build:
- xcode-start-simulator:
inputs:
- destination: platform=iOS Simulator,name=iPhone 8,OS=latest
- wait_for_boot_timeout: 90
- trigger-bitrise-workflow:
is_always_run: true
run_if: '{{enveq "BITRISE_SIMULATOR_STATUS" "hanged"}}'
inputs:
- api_token: $INSERT_RESTART_TRIGGER_TOKEN
- workflow_id: insert_workflow