App Store screenshot automation¶
scripts/app-store-screenshots.py has two capture modes that share one export format and
validator:
- Fixture mode (
capture) drives the real native shells with the Debug-only synthetic browse catalog and launch routes. It does not authenticate, contact a media server, or read persisted accounts. Its images are layout evidence only: every manifest says so, and none may be uploaded. - Live-catalog mode (
live start|shot|drive|finish) captures an ordinary signed-in session against the controlled licensed review catalog. The exporter launches the installed app with no arguments at all, a person (orlive drive) signs in and navigates normally, and each shot requires the same process to still be running. Simulator targets and the isolated Mac host app share the commands. This is the only lane that can produce final images; see the licensed-media capture plan.
The licensed catalog's public source and license provenance is checked in at
scripts/app-review-media-provenance.json
and covered by scripts/tests/test_app_store_screenshots.py. Raw runner evidence stays under the
ignored artifacts/ tree; an export contains only JPEGs and a sanitized checksum manifest.
Apple requirements checked on 2026-11-05¶
Source: Apple's screenshot specifications, upload requirements, and the linked iPhone Duo launch page. Apple allows one to ten PNG, JPEG, or JPG screenshots per device size and forbids alpha channels and transparency. Apple can change classes and sizes independently of this repository, so recheck before each release.
Apple's page now names iPhone classes rather than inch sizes. Its "Required device sizes" section reads: "iPhone: At least one screenshot for iPhone with Dynamic Island (medium display)" and "iPad (if your app supports iPadOS): At least one screenshot for iPad 13-inch display." Mac, Apple TV, and Apple Vision Pro screenshots are each required for apps on that platform.
| Apple display class (repository shorthand) | Accepted portrait / landscape pixels | Apple's requirement text | Exporter target |
|---|---|---|---|
| Apple Vision Pro | 3840 × 2160 | Required for Apple Vision Pro | visionos |
| iPhone Duo, outer display | 1398 × 2034 / 2034 × 1398 | Starting in April 2027, required for any app using the iOS 27.1 SDK or later; submitting Duo screenshots adds a "made for iPhone Duo" product-page badge | duo-outer |
| iPhone Duo, inner display | 2007 × 2853 / 2853 × 2007 | Same as outer | duo-inner |
| iPhone with Dynamic Island, large ("6.9-inch") | 1260 × 2736, 1290 × 2796, 1320 × 2868 (and landscape) | None stated; falls back to scaled Face ID (large) | iphone69 (1320 × 2868) |
| iPhone with Face ID, large ("6.5-inch") | 1284 × 2778, 1242 × 2688 (and landscape) | Required if the app runs on iPhone and Dynamic Island (large) screenshots aren't provided | none (fallback class) |
| iPhone with Dynamic Island, medium ("6.3-inch") | 1179 × 2556, 1206 × 2622 (and landscape) | Required (see above) | iphone (1206 × 2622) |
| iPad 13-inch | 2064 × 2752, 2048 × 2732 (and landscape) | Required if the app runs on iPad | ipad (2064 × 2752) |
| Apple TV | 1920 × 1080 or 3840 × 2160 | Required for Apple TV apps | tvos (3840 × 2160) |
| Mac | 1280 × 800, 1440 × 900, 2560 × 1600, 2880 × 1800 | Required for Mac apps | macos (2560 × 1600) |
Smaller iPhone and iPad classes are optional and scaled from these. Labstream builds with the iOS 27.1 SDK, so the Duo requirement applies to its submissions from April 2027; a 1.8.0 submission before then may omit Duo screenshots but loses the badge.
What Apple's page does not state (recorded as unknown)¶
- No inch sizes: "6.9-, 6.5-, 6.3-inch" are repository shorthand for the named classes.
- It does not reconcile its two iPhone rules: Dynamic Island (medium) is listed as required, while Face ID (large) is required unless Dynamic Island (large) is provided. Coverage enforces both, so the conservative iPhone set is 6.3-inch and 6.9-inch (or 6.3-inch and the 6.5-inch fallback).
- It gives only "April 2027" for Duo; coverage treats 2027-04-01 as the effective date.
- It does not say whether both Duo displays are needed or whether either one suffices, or whether Duo screenshots scale to/from other iPhone classes. Coverage requires both Duo displays.
These rules and unknowns are machine-readable in scripts/app-store-screenshot-specs.json
(displayClasses, coverageRules, unknowns, verifiedAt).
Scenes and fixture routes¶
Each target captures named scenes, exported as <target>-<NN>-<scene>-<W>x<H>.jpg so the number
gives the upload order. Fixture mode reaches each scene through Debug-only launch routes, so no
simulator taps are needed:
| Scene | Fixture route | Targets |
|---|---|---|
| home | --ui-testing-fixture browse |
all |
| library | --ui-testing-open-first-library |
all except Mac (its sidebar lists libraries from the live catalog repository, which has no fixture data) |
| detail | --ui-testing-open-item plex-orbit |
all |
| playback | --ui-testing-fixture player --ui-testing-player-paused (Mac unpaused; Duo inner adds --ui-testing-player-present-delay 8 so the appResize session starts first) |
iPhone, iPad, Duo, tvOS, Mac; visionOS has no fixture route (spatial player, passive-only simulator) |
| downloads | --ui-testing-initial-tab offline |
all except tvOS (streaming-only, no Downloads) |
The tab, first-library, and open-item routes are applied for every product by RootView
(DebugUITestLaunchConfiguration.applySharedCaptureRoute); Settings routing stays in the mobile
shell. The platform runners pass routes through --launch-arg, which accepts only --ui-testing-*
flags and plain values.
Mobile playback locks to landscape, so those images are landscape sizes of the same class. The Duo
inner target is a proxy: a devicectl device appResize session at 669 × 951 points (3×, Apple's
2007 × 2853 inner size) on the folded simulator, cropped from the Resizable display. Simulator
folding is GUI-only and simctl io screenConfig power changes do not unfold the device, so the
proxy proves layout only. Live Duo inner captures read the real inner display (primary-1) after a
person unfolds the simulator in Device Hub; live outer captures read primary.
Fixture capture¶
Hold the repository's one-simulator lease first. No other simulator may be booted. The exporter
resolves only IDs recorded by scripts/worktree-sim.sh, captures one target at a time (building
once per target and keeping the simulator booted between its scenes), and shuts each simulator
down before the next target. The 6.9-inch lane uses its own Pro Max-only simulator
(scripts/worktree-sim.sh --platform iphone69 setup); the default iPhone simulator is unchanged.
scripts/app-store-screenshots.py capture --target all --allow-simulator
scripts/app-store-screenshots.py capture --target iphone69 --target duo-outer \
--scene home --scene detail --allow-simulator
scripts/app-store-screenshots.py capture --target macos
Targets: visionos, iphone, iphone69, ipad, duo-outer, duo-inner, tvos, macos.
The command prints the export directory, artifacts/app-store-screenshots/<UTC>-fixture/export.
Scenes without a fixture route are listed in the manifest's skippedScenes.
Capture refuses an uncommitted source tree so its manifest commit is authoritative. The explicit
--allow-dirty escape hatch is for local layout review only; its manifest records gitDirty: true.
Live-catalog capture¶
Live mode never passes launch arguments and never accepts credentials. Install the release candidate on the target's worktree simulator first, then for each target:
scripts/app-store-screenshots.py live start --target iphone69 --allow-simulator
# A person signs in to the review server through the normal Jellyfin login, then navigates.
scripts/app-store-screenshots.py live shot <session> --scene home
scripts/app-store-screenshots.py live shot <session> --scene detail
scripts/app-store-screenshots.py live finish <session>
live start refuses to boot while another simulator is booted, clears the review account's watch
progress (below), overrides the iPhone/iPad status bar to 9:41 with full signal, launches with no
arguments, and records the process ID plus the installed marketing/build version. live shot refuses a relaunched process, waits for two identical frames,
checks the display-class size, and replaces any earlier shot of the same scene. live finish
clears the status bar and shuts the simulator down. A session's export lives at
<session>/export. The macos target uses the same four commands against the isolated host app
instead of a simulator; see macOS live lane.
Simulator orientation guard¶
A simulator keeps the rotation an earlier session left it in, and simctl has no command to rotate
it back. On the iPhone, iPad and iPhone Duo targets, live start therefore takes a probe screenshot
after launch and compares its orientation with the target's capturePixels in the specification
manifest. live drive does the same before it runs the UI test. A portrait target that shows a
landscape frame stops as blocked before any scene is driven, instead of exporting every scene
sideways and failing at validate. A blocked live start creates no session and shuts the
simulator down. live drive --landscape rotates the iPad on purpose, so that run is checked at its
first scene and must be landscape there.
Recovery, in order:
- Shut the simulator down and start a new session. A rotation set by a UI test (including
live drive --landscape) does not survive a shutdown, andlive finishalways shuts the simulator down, so a finished landscape session does not leak into the next one. This was verified on the iPhone and iPad simulators (Xcode 27.1); the leak needs a session that was never finished. - If the new session is blocked again, the rotation is stored in the simulator. During the 1.8.0
capture only an erase cleared that state; setting
XCUIDevice.shared.orientationdid not. Run the explicit reset, then reinstall the app and sign in again:
--reset-simulator is never implied. It shuts the target's simulator down, runs
xcrun simctl erase on it, and stops without starting a session, because the erase removes the app
and its sign-in and the script does not know which build to reinstall. It accepts the iPhone, iPad
and iPhone Duo targets only; the visionOS and tvOS simulators do not rotate.
Watch-progress reset¶
Every live start first clears the review account's resume positions, played marks, play counts
and favorites, so each capture starts from the same catalog. Without it the state drifts: every
live drive plays the title a little further, Home's Continue Watching and Next Up shelves change
between runs, and the title eventually sits at its end. The reset signs in to the review server as
the review account from its own device identity, sends the same "mark unwatched" and "unfavorite"
calls the app makes (the review account may not write user data directly), and logs that one
session out. It never touches the app's own session, prints no address or credential, and records
watchProgressReset and the number of items cleared in the session's live-session.json.
Titles listed in the optional LABSTREAM_LIVE_WATCHED_TITLES value (comma-separated, exact) are
kept or marked watched instead, together with their episodes. The review catalog's sample series
goes there: left unwatched, it leads Home's Next Up shelf in every capture.
The reset needs the private values in scripts/app-review-live.env (next section), so live start
stops as blocked without them. Pass --skip-reset to capture the existing state on purpose, for
example a hand-driven session that should show a Continue Watching shelf. The server's own nightly
reset is unrelated and stays in place.
Automated sign-in and navigation (live drive)¶
live drive replaces the person in the steps above with the opt-in live-catalog UI test for the
session's product (LabstreamMobileLiveCatalogUITests, LabstreamTVLiveCatalogUITests, or
LabstreamVisionLiveCatalogUITests). The test attaches to the process that live start launched
without arguments (XCUIApplication.activate(); the session's PID check still applies). If the app
is signed out, the test signs in with username and password. It then goes Home → Movies → Spring
details → play, and the driver runs live shot at the home, library, detail and playback
checkpoints. Each test pauses playback past the opening title cards before the playback checkpoint,
because a playing video never gives the host two identical frames. live drive --landscape rotates
the iPad first, which shows the sidebar and a full-width player; without it the iPad is captured in
portrait. live start retries the app launch for a few seconds, because a simulator can refuse the
first launch right after boot.
The visionOS golden simulator is signed in to Plex and must not be used. Run the visionOS session
from a linked worktree, and make its clone signed-out first: xcrun simctl uninstall "$SIMID"
org.labstream.Labstream, xcrun simctl keychain "$SIMID" reset, then install the build. Pass the
main worktree's private file with --config on live start and live drive.
cp scripts/app-review-live.env.example scripts/app-review-live.env # gitignored; fill in, chmod 600
# Build the target's UI tests once (iPhone/iPad shown; tvOS: LabstreamTV + LabstreamTVUITests plan;
# visionOS: Labstream scheme).
scripts/xcodebuild-versioned.sh -project Labstream.xcodeproj -scheme LabstreamMobile \
-testPlan LabstreamTests -destination "platform=iOS Simulator,id=$SIMID" \
-derivedDataPath build/DerivedData-ios-iphone build-for-testing CODE_SIGNING_ALLOWED=NO
xcrun simctl install "$SIMID" build/DerivedData-ios-iphone/Build/Products/Debug-iphonesimulator/Labstream.app
SESSION=$(scripts/app-store-screenshots.py live start --target iphone --allow-simulator --dry-run \
| sed -n 's/^SESSION: //p')
scripts/app-store-screenshots.py live drive "$SESSION" \
--xctestrun build/DerivedData-ios-iphone/Build/Products/*.xctestrun
scripts/app-store-screenshots.py live finish "$SESSION"
The server address, username and password come only from scripts/app-review-live.env or the
caller's environment (LABSTREAM_LIVE_AUTH_SERVER, LABSTREAM_LIVE_AUTH_USERNAME,
LABSTREAM_LIVE_AUTH_PASSWORD). They reach the test as xcodebuild TEST_RUNNER_ variables and are
never printed. Missing values stop the command as blocked before anything runs, and the tests
themselves skip. XCUITest logs typed text, so the driver keeps only a redacted
<session>/private-test.log and deletes the result bundle (--keep-result keeps it for
debugging; it contains the typed values). The test never signs out. An app signed in to another
account fails at the catalog check, so sign out by hand first.
macOS live lane¶
There is no macOS simulator, so --target macos drives this worktree's isolated host build (the
per-worktree development identity from scripts/deploy-macos-to-host.sh; never the production
bundle ID and never /Applications/Labstream.app). It needs no simulator lease and no
--allow-simulator, but it does use the real desktop: leave the Mac unlocked and idle while it
runs.
scripts/deploy-macos-to-host.sh # build and stage the isolated app once
SESSION=$(scripts/app-store-screenshots.py live start --target macos --dry-run \
| sed -n 's/^SESSION: //p')
scripts/app-store-screenshots.py live drive "$SESSION" # no --xctestrun on macOS
scripts/app-store-screenshots.py live finish "$SESSION"
scripts/app-store-screenshots.py validate "$SESSION/export"
live startruns the watch-progress reset, relaunches the staged app with no arguments (deploy-macos-to-host.sh --no-build --launch), checks both host permissions, and records the process ID and the staged app's marketing/build version. It stops asblockedwhen no app is staged.live driveuses theliveoperations ofscripts/agent-macos-ax-driver.swift, the same Accessibility driver as the fixture runner, in place of a UI test. If the app is signed out it fills the Jellyfin username/password form by setting the text fields' values; the private values reach the driver as environment variables and never appear in a command line, a log or an error. It confirms the first-run library chooser, sizes the window, then goes Home → Movies → Spring details → play and shootshome,library,detailandplayback. Before the playback shot it reveals the player controls, pauses, and skips forward three times, like the UI tests.live shotrequires the session's process, brings the app to the front, sizes the window so that a window-only capture is exactly 2560 × 1600 pixels (1280 × 800 points on a 2× display; 2560 × 1600 points on a 1× display), waits for two identical frames ofscreencapture -lfor that one window without its shadow, and applies the same size check, export and manifest rules as the simulator targets. The capture is flattened onto a dark matte, because a window capture is transparent outside the rounded corners and a JPEG would turn them white. A hand-driven session can uselive shotthe same way.live finishquits only the process the session launched and validates the export.
Everything is semantic Accessibility. The lane posts no mouse or keyboard events and never moves the pointer. The sidebar's selected row is amber only while the sidebar has keyboard focus in the frontmost app, so each sidebar scene selects the row and then focuses the sidebar outline through Accessibility; that gives the same highlight as a real click.
The lane fails closed with a blocked message when:
- Accessibility or Screen Recording permission is missing for the app that runs the command (the terminal or agent host). It never falls back to a full-desktop capture.
- The window does not keep the requested size. A tiling window manager re-tiles a new window
right after the resize; when
aerospaceis onPATHthe lane sets that one window to floating (aerospace layout floating --window-id N) and retries once. The setting disappears with the window atlive finish. Other window managers, or a display too small for the window, stop the run. - Labstream cannot be made the frontmost app. An inactive window is dimmed and its selection is grey, so it is never captured.
--landscape, --keep-result and --xctestrun do not apply to a macos session.
--dry-run on live start adds "dryRun": true and a note to the export manifest. Dry-run
exports prove that the automation works and are never final screenshots: coverage --live-only
rejects them. Final screenshots come from a later live session without --dry-run, reviewed by
the release owner.
Validate and check coverage¶
scripts/app-store-screenshots.py validate <export>
scripts/app-store-screenshots.py coverage <export> [<export> ...] [--live-only] \
[--target ipad ...] [--as-of 2027-04-01] [--include-upcoming]
validate fails unless every image has an accepted pixel size for its target's display class, no
alpha channel, the recorded SHA-256, at most ten images per class, and the wording that matches its
mode: fixture entries must record their --ui-testing flags and the fixture content line; live
entries must record an empty argument list and the live-catalog content line. No manifest may claim
releaseEligible: true; release approval is a human decision outside the tool.
coverage validates each export, unions their display classes, and fails on any missing
coverageRules entry. Requirements that are not yet in effect (Duo before April 2027) are reported
as upcoming and fail only with --include-upcoming. Use --live-only for a release set so a
fixture export can never satisfy coverage.
Determinism and privacy boundary¶
Fixture captures use --ui-testing --ui-testing-backend plex --ui-testing-fixture browse|player
plus routes. The fixture contains invented titles, people, studio names, summaries, IDs, and a
non-resolving fixture.invalid URL. Artwork requests cannot reach a real service, so the production
UI renders its own placeholders. Mobile captures override the status bar to 9:41 with full Wi-Fi and
battery and clear it during cleanup. Release builds do not compile the catalog or routes.
Exports exclude runner logs, video, .xcresult data, app paths, simulator IDs, host paths, server
addresses, accounts, and launch manifests. Keep the generated artifacts/ tree untracked.
Automated versus gated¶
Automated: clean builds, exact-product installation, fixture launch per scene, process/log smoke checks supplied by the platform runners, device/window capture, Duo display selection, conversion, dimensions, alpha rejection, checksums, mode wording, and display-class coverage.
Outside automation:
- Apple Vision Pro interaction and playback:
live drivesigns in and navigates through XCUITest element queries, but nothing in automation proves gaze, pinch-drag, immersive, or headset rendering. Coordinate clicking must not be used. - iPhone Duo folding: the inner fixture image is an appResize proxy; a real unfold (Device Hub or hardware) is required for final inner images.
- Mac host permissions and desktop: the isolated Accessibility driver and window-only capture require the host permissions in macOS development. A missing permission is a blocker, not a reason to capture the full desktop. The Mac live lane runs on the real desktop, so it also needs an unlocked, idle session and a display that fits the capture window.
- Hardware truth: simulator images do not prove HDR, HDMI/audio, Siri Remote, gaze, comfort, performance, or physical-device rendering.
- Editorial and legal review: a person must inspect every final image for composition, clipped content, transient system UI, branding, licensed artwork, credits, and privacy.
- Upload: upload remains the release owner's decision.
scripts/asc-screenshots.py statuslists what App Store Connect holds, andupload EXPORT_DIR… --yesreplaces the named sets of the editable version'sen-USlocalization with the exports' JPEGs in file-name order (without--yesit only prints the plan). It reuses the TestFlight tooling's App Store Connect key, maps iPhone 6.3-inch, iPhone 6.9-inch, iPad 13-inch, Apple TV, Vision Pro and Mac exports, and refuses iPhone Duo exports because no screenshot set for that display is confirmed. Other localizations and ordering beyond file-name order are done by hand.