Skip to content

Add snapshot() to write the hosted window as a PNG - #1

Merged
ast3150 merged 1 commit into
mainfrom
feature/snapshot
Oct 6, 2026
Merged

ast3150 merged 1 commit into
mainfrom
feature/snapshot

Conversation

@yannickpulver

Copy link
Copy Markdown
Contributor

Summary

  • Adds snapshot("name"), which writes the hosted window as a PNG. Useful for looking at a view in a PR review.
  • Includes menu and popover windows. Sheets show up with their dimmed backdrop.
  • Writes to SNAPSHOT_DIR (or a temp folder). Compares nothing and leaves out the system status bar.
  • Falls back to layer rendering without a host app. There drawHierarchy draws an empty image.
  • Documents in the README that the host app needs a launch screen. Without one iOS runs it at 320×480 points.

@yannickpulver
yannickpulver requested a review from ast3150 October 5, 2026 19:20
@ast3150
ast3150 merged commit 719dde6 into main Oct 6, 2026
2 checks passed
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.

2 participants