Skip to content

v2.0.5 – Screenshot retry, exit code separation, and named preview selection

Choose a tag to compare

@Iron-Ham Iron-Ham released this 26 Mar 22:31
· 5 commits to main since this release
a15f317

What's Changed

Bug Fixes

  • Screenshot capture retry (#37): simctl io screenshot now retries up to 3 times with 2s delays to handle transient "Timeout waiting for screen surfaces" errors on Xcode beta simulators.
  • Capture vs build failure exit codes (#37): preview-tool now exits with code 2 for capture failures (distinct from code 1 for build failures). The scripts/preview fallback only triggers on build failures, preventing the misleading cascade where a capture failure triggered a full scheme build that reported "Build failed with exit code 65."

New Features

  • Named preview selection (#37): Files with multiple #Preview blocks can now target a specific one via --preview-name:
    ./scripts/preview MyView.swift --project App.xcodeproj --preview-name "Dark Mode"
    • Exact match first, case-insensitive substring fallback
    • Helpful error messages listing available preview names when no match found
    • New PreviewExtractor.listPreviews(from:) API for programmatic discovery

Tests

  • 5 new tests for named preview selection (164 total)

Full Changelog: v2.0.4...v2.0.5