# Test watchOS Apps Using a Remote Mac Simulator

Canonical: https://figment.so/blog/mac-watchos-simulator-remote-mac

Create an iPhone and Apple Watch simulator pair with xcrun simctl, boot both, then build with the iPhone's UDID as the xcodebuild destination. Sensors and haptics still need a real watch.

**A watchOS app installs through a paired iPhone simulator, so the Apple Watch simulator is a valid destination only once a phone pair is booted alongside it.** Create both simulators with `xcrun simctl`, pair them, boot them, then pass the iPhone's UDID to `xcodebuild`. Do this on the Mac that runs the simulator, which makes the whole loop reproducible. Run the commands below over SSH or in Terminal inside a remote desktop session.

## How does watchOS simulator pairing work?

An Apple Watch simulator must be paired to a specific booted iPhone simulator before an app can be installed on it, mirroring how a physical watch is bound to one phone. When a WatchKit scheme builds, Xcode routes the watch payload through the paired phone. That is why the correct `-destination` is the phone's UDID, not the watch's. Apple's [Running your app in Simulator or on a device](https://developer.apple.com/documentation/xcode/building-and-running-an-app) is the reference for the simulator destination model.

## How do I list device types and runtimes?

Confirm that the watchOS runtime is installed on the remote Mac before creating anything:

```bash
# Runtimes: look for watchOS and iOS rows
xcrun simctl list runtimes

# Device types
xcrun simctl list devicetypes | grep -i watch
xcrun simctl list devicetypes | grep iPhone
```

If the watchOS runtime is missing, install it from **Xcode → Settings → Platforms** in a remote desktop session, or with:

```bash
xcodebuild -downloadPlatform watchOS
```

Copy the exact identifiers you see, for example `com.apple.CoreSimulator.SimRuntime.watchOS-11-0` and a device-type string that ends with the model and size, rather than hard-coding values from a guide. Identifier strings change between Xcode versions.

## How do I create and boot a paired simulator set?

This script resolves identifiers from your installed Xcode, creates both simulators, pairs them and boots them:

```bash
set -euo pipefail

# Resolve the first matching identifier; override by pasting the explicit
# string from `xcrun simctl list` output if you want a specific model/runtime.
WATCH_TYPE="$(xcrun simctl list devicetypes | awk '/Apple Watch/ {print $NF; exit}' | tr -d '()')"
WATCH_RUNTIME="$(xcrun simctl list runtimes | awk '/watchOS/ {print $NF; exit}' | tr -d '()')"
PHONE_TYPE="$(xcrun simctl list devicetypes | awk '/iPhone/ {print $NF; exit}' | tr -d '()')"
PHONE_RUNTIME="$(xcrun simctl list runtimes | awk '/iOS/ {print $NF; exit}' | tr -d '()')"

for v in "$WATCH_TYPE" "$WATCH_RUNTIME" "$PHONE_TYPE" "$PHONE_RUNTIME"; do
  [[ -n "$v" ]] || { echo "Missing identifier — run 'xcrun simctl list' and paste the exact string." >&2; exit 1; }
done

PHONE_UDID=$(xcrun simctl create "Paired iPhone" "$PHONE_TYPE" "$PHONE_RUNTIME")
WATCH_UDID=$(xcrun simctl create "Paired Watch"  "$WATCH_TYPE"  "$WATCH_RUNTIME")

# Pair order is watch first, then phone
xcrun simctl pair "$WATCH_UDID" "$PHONE_UDID"

xcrun simctl boot "$PHONE_UDID"
xcrun simctl boot "$WATCH_UDID"

open -a Simulator

echo "Phone: $PHONE_UDID"
echo "Watch: $WATCH_UDID"
```

`open -a Simulator` needs a graphical session, so run that line in the remote desktop. Verify the pair with `xcrun simctl list pairs`, where the entry should read `(active)`. This is an untested example, so run it against your own Xcode install and check its exit status before wiring it into CI.

## How do I deploy a WatchKit scheme with xcodebuild?

Pass the iPhone's UDID as the destination. Xcode installs the watch payload through the paired phone automatically:

```bash
set -euo pipefail

PHONE_UDID="<paste from previous step>"
WORKSPACE="YourApp.xcworkspace"            # or -project YourApp.xcodeproj
SCHEME="YourApp WatchKit App"              # your actual scheme name

xcodebuild build \
  -workspace "$WORKSPACE" \
  -scheme "$SCHEME" \
  -destination "platform=iOS Simulator,id=$PHONE_UDID" \
  -derivedDataPath ./DerivedData \
  CODE_SIGN_IDENTITY="" \
  CODE_SIGNING_REQUIRED=NO
```

Replace `build` with `test` and add `-only-testing:YourWatchTests` to run a test bundle. To launch the watch app after a build, install it on the watch simulator and launch it by bundle identifier:

```bash
xcrun simctl install "$WATCH_UDID" path/to/YourWatchApp.app
xcrun simctl launch "$WATCH_UDID" com.example.YourWatchApp
```

Use your real scheme name and bundle identifier. The strings above are placeholders, not a benchmark or a verified run.

## How do I test complications and HealthKit on the pair?

**Complication preview.** With the watch simulator booted, use Simulator.app's **Features** menu to change the watch face, then long-press the face to enter edit mode and add your complication. Timeline entries render immediately from your `CLKComplicationDataSource`, so you can iterate on layout without a physical device.

**HealthKit mock data.** The watch simulator accepts `HKQuantitySample` and `HKWorkout` writes through `HKHealthStore.save(...)`. Seed a store from a debug-only code path in your test target so the same data loads on every boot. Live sensor streams (heart rate, accelerometer, gyroscope) are not available in the simulator.

**Background refresh.** Simulator.app exposes test hooks under **Features** or **Debug** in current versions. Menu paths change between releases, so check the installed build. If the hook is missing, trigger your refresh handler from a debug entry point that posts the same notification.

## What can the simulator not test?

Simulator coverage handles layout, navigation, complication data sources, HealthKit writes and `WCSession` message passing end to end. Sensor-driven features and haptics still need a real watch.

| Capability | Simulator | Physical device |
|---|---|---|
| Complication timelines | Yes | Yes |
| HealthKit reads/writes | Yes (mocked data) | Yes (live sensors) |
| Heart rate / motion sensors | Not available | Yes |
| Digital Crown | Scroll gesture | Tactile + software |
| Taptic Engine haptics | Not available | Yes |
| WatchConnectivity (`WCSession`) | Yes, via paired iPhone sim | Yes |
| Always-on display | Not available | Series 5+ |
| GPS in workout sessions | Not available | Yes |

## Which Figment Mac plan fits watchOS simulator work?

For routine WatchKit layout, complication and HealthKit work on Xcode 26.3 or earlier, the [Intel Mac VM](/mac-hosting#intel-vm) ($25 a month, $2 a day) runs macOS Sequoia. Apple's [porting guidance](https://developer.apple.com/documentation/apple-silicon/porting-your-macos-apps-to-apple-silicon) says Intel Macs use Xcode 26 or earlier. Xcode 26.4 and later, Xcode 27 and arm64-only binaries need an Apple silicon plan, such as the [Apple Silicon Mac VM](/mac-hosting#apple-silicon-vm) ($39 a month, $6 a day). We have not measured Simulator performance inside a VM, so for several simulators at once, test on the [Dedicated M4 Pro 48 GB](/mac-hosting#dedicated-m4-pro) ($349 a month, cancel any time) in the first days. See all [Mac hosting plans](/mac-hosting).

**Related guides:**
- [Onboard a Mac team onto remote Xcode](/blog/mac-team-onboarding-remote-xcode)
- [Debug Swift concurrency on a remote Mac](/blog/mac-swift-concurrency-debugging)
- [Mac GitHub Actions self-hosted runner](/blog/mac-github-actions-self-hosted-runner)
