Skip to content

ci: resolve iOS simulator at runtime instead of pinning iPhone 16#54

Merged
alexvbush merged 1 commit into
mainfrom
fix-ci-simulator-destination
Jul 12, 2026
Merged

ci: resolve iOS simulator at runtime instead of pinning iPhone 16#54
alexvbush merged 1 commit into
mainfrom
fix-ci-simulator-destination

Conversation

@alexvbush

Copy link
Copy Markdown
Collaborator

Problem

The build-and-test job hardcodes the test destination:

-destination 'platform=iOS Simulator,name=iPhone 16'

When the macos-latest runner image rolls forward, iPhone 16 is no longer preinstalled (the current image ships iPhone 16e / 17 / 17 Pro / Air, etc.). xcodebuild then fails destination resolution with exit 70 — "Unable to find a device matching the provided destination specifier", before compiling or running a single test. This is currently red on open PRs (e.g. #51) through no fault of the change under review.

Fix

Resolve an available iPhone simulator at runtime with simctl + jq and pass it by id:

DEVICE_ID=$(xcrun simctl list devices available --json \
  | jq -r '[.devices[][] | select(.name | test("iPhone"))] | first | .udid')

This picks whatever iPhone simulator the runner actually has, so it won't rot on model-name churn.

A generic destination (generic/platform=iOS Simulator) is not an option here: the job runs test, which requires a bootable device — generic destinations only build.

Notes

  • jq is preinstalled on GitHub-hosted macOS runners.
  • Verified locally that xcodebuild test with -destination "platform=iOS Simulator,id=<udid>" runs the suite green.

🤖 Generated with Claude Code

The `build-and-test` job hardcoded `-destination 'platform=iOS Simulator,
name=iPhone 16'`. When the `macos-latest` runner image rolls forward, that
model is no longer preinstalled (current image ships iPhone 16e / 17 / 17 Pro
/ Air, etc.), so xcodebuild fails destination resolution with exit 70 before
running a single test.

Resolve an available iPhone simulator at runtime via `simctl` + `jq` and pass
it by `id`. A generic destination (`generic/platform=iOS Simulator`) is not an
option here because the job runs `test`, which requires a bootable device.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J9mruKG6RSYg6SfPaq6MPG
@alexvbush alexvbush merged commit 83747b1 into main Jul 12, 2026
3 checks passed
@alexvbush alexvbush deleted the fix-ci-simulator-destination branch July 12, 2026 22:05
alexvbush added a commit to haeseoklee/RIBs-iOS that referenced this pull request Jul 12, 2026
Pulls in the CI simulator-destination fix (uber#54) so this PR's build-and-test
job can resolve a simulator on the current runner image and run the suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant