mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-09 20:29:58 +02:00
feat(studio): native SwiftUI + SceneKit App Store screenshot pipeline
Replace the Typst/ImageMagick studio with a SwiftPM executable that composes each marketing screen as a SwiftUI view and renders it headlessly via ImageRenderer to exact 1284x2778 PNGs. - Devices are a real iPhone 17 Pro Max .usdz textured + posed in SceneKit (graphite body, studio IBL); screen curvature/bezel are the model's geometry. - Per-screen layouts (pose, globe, route arc, encryption flow) in ScreenSpec. - send-anywhere: globe + Paris->LA route arc; uses the app's share screen. - stay-private: converging beams -> glowing padlock -> binary protection stream, with localized CHIFFREMENT/PROTECTION banners and an auto-sizing header panel. - Captions auto-shrink per locale (ViewThatFits) so long translations never clip. - Screenshots are transient (generated/shots, git-ignored), captured per locale; generate.sh does capture + composite in one shot. - Commit the .usdz model (CC BY 4.0, see assets/ATTRIBUTION.md) and globe asset. - Remove the superseded Typst pipeline (screens.typ, build.sh, frame.sh, warp.sh).
This commit is contained in:
@@ -19,8 +19,14 @@ DEVICE="${SCREENSHOT_DEVICE:-iPhone 17 Pro Max}"
|
||||
BUNDLE_ID="com.vnidrop.app"
|
||||
LOCALES=${LOCALES:-"en fr de es it nl pl pt ru"}
|
||||
|
||||
# scenario (launch arg value) -> studio screen id (output filename stem)
|
||||
SCENARIOS="share:share-securely approval:choose-receivers transfer-details:send-anywhere"
|
||||
# scenario (launch arg value) -> studio screen id (output filename stem).
|
||||
# send-anywhere reuses the share screenshot (see ScreenSpec shotId), so it isn't
|
||||
# captured separately; stay-private uses black screens (no capture).
|
||||
SCENARIOS="share:share-securely approval:choose-receivers"
|
||||
|
||||
# Screenshots are transient build output, regenerated per run — never committed. They
|
||||
# live under generated/ (git-ignored), not in assets/.
|
||||
SHOTS_DIR="${SHOTS_DIR:-generated/shots}"
|
||||
|
||||
echo "==> Regenerating project"; (cd "$APPLE_DIR" && xcodegen generate >/dev/null)
|
||||
|
||||
@@ -46,7 +52,7 @@ xcrun simctl status_bar "$UDID" override --time "9:41" \
|
||||
xcrun simctl install "$UDID" "$APP"
|
||||
|
||||
for loc in $LOCALES; do
|
||||
mkdir -p "assets/shots/$loc"
|
||||
mkdir -p "$SHOTS_DIR/$loc"
|
||||
for pair in $SCENARIOS; do
|
||||
scenario="${pair%%:*}"; screen="${pair##*:}"
|
||||
xcrun simctl launch --terminate-running-process "$UDID" "$BUNDLE_ID" \
|
||||
@@ -56,9 +62,9 @@ for loc in $LOCALES; do
|
||||
# on external/again-protected volumes), so capture to a temp file and move it in.
|
||||
tmp="$(mktemp -t vnishot).png"
|
||||
xcrun simctl io "$UDID" screenshot "$tmp" >/dev/null 2>&1
|
||||
mv "$tmp" "assets/shots/$loc/$screen.png"
|
||||
echo " 📸 $loc/$screen.png"
|
||||
mv "$tmp" "$SHOTS_DIR/$loc/$screen.png"
|
||||
echo " 📸 $SHOTS_DIR/$loc/$screen.png"
|
||||
done
|
||||
done
|
||||
echo ""
|
||||
echo "Done. Now run ./build.sh to composite."
|
||||
echo "Done. Now run 'swift run studio' to composite."
|
||||
|
||||
Reference in New Issue
Block a user