GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode-mobile/scripts/iphone-duo-frames.sh at main · opencode-mobile/opencode-mobile

Expand file tree

/

iphone-duo-frames.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
26 lines (23 loc) · 1.18 KB
/

iphone-duo-frames.sh

Copy path

File metadata and controls

executable file
·
26 lines (23 loc) · 1.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# Export Apple's iPhone Duo device frames from the local Xcode as SVG for
# prototypes. Needs Xcode 27.1+ (DeviceKit chrome phone14/phone15) and
# pdftocairo (poppler). The repository does not ship Apple's artwork.
#
# usage: scripts/iphone-duo-frames.sh <out-dir>
# Geometry: docs/devices/iphone-duo.md and docs/devices/iphone-duo/geometry.json
set -euo pipefail
out="${1:?usage: $0 <out-dir>}"
chrome=/Library/Developer/DeviceKit/Chrome
command -v pdftocairo >/dev/null || { echo "pdftocairo not found (brew install poppler)" >&2; exit 1; }
for name in phone15 phone14; do
[ -f "$chrome/$name.devicechrome/Contents/Resources/PhoneComposite.pdf" ] || {
echo "Missing $chrome/$name.devicechrome; install Xcode 27.1 or later" >&2
exit 1
}
done
mkdir -p "$out"
# Outer display: 514×706, screen at (26, 14).
pdftocairo -svg "$chrome/phone15.devicechrome/Contents/Resources/PhoneComposite.pdf" "$out/iphone-duo-outer.svg"
# Inner display: 660×924 composite with 17pt margins; scale by 669/626.
pdftocairo -svg "$chrome/phone14.devicechrome/Contents/Resources/PhoneComposite.pdf" "$out/iphone-duo-inner.svg"
echo "Wrote $out/iphone-duo-outer.svg and $out/iphone-duo-inner.svg"
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.