Repository navigation
Conversation
Add `simslim screenshot <udid> [path]`, which captures a booted simulator's screen as a PNG via `simctl io screenshot` and, under --json, reports the written path. Like boot and shutdown it resolves the exact UDID first, so an alias such as "all" never reaches the capture path. A device with more than one display (for example an iPad presenting an external display) makes simctl refuse to choose and list the displays. CaptureScreenshot parses that listing and retries against the display marked "(primary)". The macOS app gains a Table/Grid toggle in the toolbar. The grid shows each simulator as a card with its live screen, refreshed every few seconds while the grid is visible (at most four captures at a time), plus boot and slim state, tap-to-select, and a context menu for boot, shutdown, slim, unslim, and rename. Shut-down simulators show a placeholder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a way to see what each simulator is showing, from both the CLI and the macOS app.
CLI:
simslim screenshot <udid> [path]simctl io screenshot, topathor a temp file.--jsonreturns{udid, name, path}(ScreenshotOutputinoutput.go).bootandshutdowndo, so an alias likeallnever reaches the capture path. A shut-down simulator gets a clear error.CaptureScreenshotparses that list and retries against the display marked(primary). I hit this on an iPad simulator during manual testing.App: Table / Grid toggle
--json. There is no new IPC.Testing
On top of current
main(v0.15.0):go test ./...,go vet ./...,gofmt -l .: cleanswift-format lint --strict --recursive gui: cleanzsh -n scripts/build-app.sh,plutil -lint gui/Info.plist,make app: passscreenshot --jsonwrote valid PNGs, and the multi-display retry produced the primary screen. In the app's grid, a booted device's preview appeared after boot and kept refreshing.I did not add unit tests. If you want them,
CaptureScreenshotandprimaryDisplayIDcan be covered with the existing fake-xcrunPATH pattern fromsimctl_test.go.🤖 Generated with Claude Code