Skip to main content

Build for watchOS simulator

Updated this week

Issue:

Xcode Build For Simulator Step doesn't support watchOS in its inputs.

Possible solutions:

The workaround is to use a Script Step like below:

  - script@1:
      inputs:
      - content: |-
        set -e
        WATCH_SIM_ID=$(xctrace list  devices | grep -m 1 "Apple Watch Ultra (49mm)" | awk '{print substr($0,length($0)-36,36)}')
        xcodebuild -project $BITRISE_PROJECT_PATH -scheme $BITRISE_SCHEME -destination "platform=watchOS simulator,id=$WATCH_SIM_ID"
	
Did this answer your question?