Skip to content

Add App Store screenshot generation#170

Merged
pascalpp merged 20 commits into
mainfrom
codex/169-app-store-assets
Jun 8, 2026
Merged

Add App Store screenshot generation#170
pascalpp merged 20 commits into
mainfrom
codex/169-app-store-assets

Conversation

@pascalpp

@pascalpp pascalpp commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a debug-only App Store screenshot renderer with three screenshot scenarios
  • Add tracked 2880x1800 screenshot PNGs under appstore/screenshots
  • Add npm run generate:screenshots for regenerating screenshots from the app

Closes #169.

Test Plan

  • xcodebuild -project "Free Ruler.xcodeproj" -scheme "Free Ruler" build
  • npm run generate:screenshots

pascalpp added 8 commits June 7, 2026 17:30
Add AppStoreScreenshotPreview.swift (DEBUG-only) to render an App Store screenshot preview using SwiftUI/NSViewRepresentable and custom drawing for sample window, traffic lights and rulers. Update project.pbxproj to add the new file reference and include it in the target's Sources/build files so the preview is available in Debug builds.
Add programmatic App Store screenshot generation and tooling. AppDelegate (DEBUG) now recognizes --generate-app-store-screenshots <dir> to render and export screenshots then exit. Implement AppStoreScreenshotRenderer to render scenario views to PNG, plus UI tweaks (ruler borders, titlebar divider, drawing fixes) in AppStoreScreenshotPreview. Add scripts/generate-app-store-screenshots.sh and a package.json script (generate:screenshots) to build and run the app for export. Include three generated screenshots in appstore/screenshots/.
Introduce layout constants and computed rects for screen1 (gutters, widths, heights, border color/width/radius) and sampleWindowContentRect to position box regions inside the sample window. Add drawScreen1Boxes() to render three screen1 boxes and a stroke(_:,color:,width:,radius:) helper to support rounded border drawing (plus a convenience overload). Update the screenshot asset as well. These changes visually mark subregions in the App Store preview sample window.
@pascalpp pascalpp requested a review from Copilot June 7, 2026 23:37

pascalpp commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

@copilot please review this PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a debug-only, in-app renderer for generating App Store marketing screenshots, plus a script/NPM command to build the app and export the images to appstore/screenshots. This fits the codebase’s existing approach of generating assets from code (similar to the app icon generation scripts).

Changes:

  • Add AppStoreScreenshotRenderer + SwiftUI preview scenarios to render three screenshot layouts in Debug builds.
  • Add a --generate-app-store-screenshots <dir> debug-only app launch mode to export PNGs and exit.
  • Add scripts/generate-app-store-screenshots.sh and npm run generate:screenshots to build + run the generator.

Reviewed changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/generate-app-store-screenshots.sh Builds the Debug app to a dedicated DerivedData path and runs the screenshot export mode.
package.json Adds generate:screenshots convenience script.
Free Ruler/AppStoreScreenshotPreview.swift Implements the screenshot scene layouts, rendering, and PNG export (Debug-only).
Free Ruler/AppDelegate.swift Adds a debug-only CLI flag handler to generate screenshots and terminate.
Free Ruler.xcodeproj/project.pbxproj Adds the new screenshot preview/source file to the project build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift
Comment thread Free Ruler/AppStoreScreenshotPreview.swift
Comment thread Free Ruler/AppStoreScreenshotPreview.swift
Comment thread Free Ruler/AppStoreScreenshotPreview.swift

Copilot AI commented Jun 7, 2026

Copy link
Copy Markdown

@copilot please review this PR.

Reviewed the PR changes and I don’t see any blocking issues. The screenshot layout/drawing additions look correct and low risk.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.

Comment thread scripts/generate-app-store-screenshots.sh
Comment thread Free Ruler/AppStoreScreenshotPreview.swift Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift
Comment thread Free Ruler/AppStoreScreenshotPreview.swift

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Comment thread scripts/generate-app-store-screenshots.sh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift
Comment thread Free Ruler/AppStoreScreenshotPreview.swift

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift Outdated
Switch colorSpaceName from .calibratedRGB to .deviceRGB in AppStoreScreenshotPreview to ensure screenshots are rendered with the device color space. Also replace three App Store screenshot assets (appstore/screenshots/01-measure-anything.png, 02-switch-units.png, 03-customize-rulers.png) with updated images.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.

Comment thread Free Ruler/AppStoreScreenshotPreview.swift
Comment thread Free Ruler/AppStoreScreenshotPreview.swift
@pascalpp pascalpp merged commit afca957 into main Jun 8, 2026
1 check 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.

Update App Store assets

3 participants