v2.0.5 – Screenshot retry, exit code separation, and named preview selection
What's Changed
Bug Fixes
- Screenshot capture retry (#37):
simctl io screenshotnow 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-toolnow exits with code 2 for capture failures (distinct from code 1 for build failures). Thescripts/previewfallback 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
#Previewblocks 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