Skip to content

v2.0.0

Latest

Choose a tag to compare

@Iron-Ham Iron-Ham released this 17 Feb 21:10
· 1 commit to main since this release
1ebaa08

Swift CLI Preview Tool

Replaces the Ruby-based preview infrastructure with a native Swift CLI (preview-tool), removing the xcodeproj gem dependency entirely.

What's New

  • preview-tool Swift CLI — Pre-compiled binary handles Xcode project injection, SPM package previews, and declaration-level dependency resolution, all in a single process
  • preview-spm subcommand — Creates temporary Xcode projects with local SPM package dependencies for previewing SwiftUI views in SPM packages
  • Auto-rebuild — The scripts/preview entry point automatically rebuilds preview-tool when source files change (no manual build step needed)
  • Declaration-level dependency resolver — Resolves only the declarations needed for a preview, not entire files, for faster builds
  • 156 unit tests + 56 e2e integration tests

Breaking Changes

  • Ruby xcodeproj gem is no longer required. The only prerequisites are Xcode, iOS Simulator, and the Swift toolchain.
  • scripts/preview-spm.sh removed (replaced by preview-tool preview-spm)
  • scripts/preview-dynamic.sh removed (replaced by preview-tool preview)
  • scripts/inject-preview-target.rb removed (dead code)

Performance

The Swift CLI eliminates ~1.5–2.5 seconds of Ruby/subprocess overhead per preview capture. Actual xcodebuild time is unchanged.

Updated Docs

All instruction files updated and synced: CLAUDE.md, README.md, .claude/commands/preview.md, .cursor/rules/preview.mdc, .cursor/skills/preview/SKILL.md, skills/preview/SKILL.md, .codex/skills/xcode-preview-capture/SKILL.md.