<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Shipping small iOS apps | Zubin Khavarian</title><description>Every part of Zubin Khavarian&apos;s series &quot;Shipping small iOS apps&quot;, as it publishes.</description><link>https://zubin.dev/</link><language>en-us</language><atom:link href="https://zubin.dev/rss/shipping-ios.xml" rel="self" type="application/rss+xml"/><lastBuildDate>Mon, 26 Oct 2026 10:00:00 GMT</lastBuildDate><image><url>https://zubin.dev/avatar.png</url><title>Shipping small iOS apps | Zubin Khavarian</title><link>https://zubin.dev/</link></image><item><title>240 App Store Screenshots from One Script</title><link>https://zubin.dev/blog/app-store-screenshots-script/</link><guid isPermaLink="true">https://zubin.dev/blog/app-store-screenshots-script/</guid><description>How I make App Store screenshots for my iOS apps in 15 languages without touching a design tool: debug launch arguments, one simulator per app, a pinned status bar, a Python framing step that handles right-to-left captions, and a linter for the listing text.</description><pubDate>Mon, 26 Oct 2026 10:00:00 GMT</pubDate><content:encoded><![CDATA[<p>I have four small iOS apps: <a href="https://zubin.dev/apps/treble-trouble/">Treble Trouble</a>, <a href="https://apps.apple.com/us/app/mathness-learn-math-facts/id6815915534" rel="noopener noreferrer" target="_blank">Mathness<span class="ext-link"><span class="ext-link-sr"> (opens in a new tab)</span></span></a>, <a href="https://apps.apple.com/us/app/solve-it-pre-algebra/id6817402311" rel="noopener noreferrer" target="_blank">Solve It<span class="ext-link"><span class="ext-link-sr"> (opens in a new tab)</span></span></a> and <a href="https://zubin.dev/apps/mahbanou/">Mahbanou</a>. Several are localized, Treble Trouble into 16 languages, 15 of which the App Store supports. The App Store wants screenshots for every language you list, at specific sizes, for iPhone and iPad.</p>
<p>For Treble Trouble alone that’s 15 languages × 2 devices × 8 screens: 240 images. And every time the design changes, they’re all out of date.</p>
<figure class="sketch not-prose"><div class="sketch-frame"><p><em>Figure: A grid of 240 small frames: 15 rows, one per App Store language from English to Hebrew, each with 8 iPhone frames and 8 iPad frames. The Arabic and Hebrew rows are highlighted as right-to-left. <a href="https://zubin.dev/blog/app-store-screenshots-script/">See the drawing in the post.</a></em></p></div><figcaption>One full pass for one app: 15 languages × 2 devices × 8 screens = 240 frames. Arabic and Hebrew lay out right to left.</figcaption></figure>
<p>I don’t make any of them by hand. Each app has a script that captures its screenshots from the Simulator, and a second script that frames them with a caption. The examples below are Treble Trouble’s. Here’s the same screen for six of those languages, straight out of the pipeline:</p>
<p><img src="https://zubin.dev/_astro/lessons-six-languages.SrrOH3ab_1EKvqJ.webp" alt="The Treble Trouble lessons screen as six framed App Store screenshots in English, Japanese, Arabic, Hindi, Russian and Hebrew. Each has a caption in its own language and script above the phone; the Arabic and Hebrew layouts are mirrored right to left." loading="lazy" decoding="async" width="2760" height="956"></p>
<h2 id="the-pipeline">The pipeline</h2>
<figure class="sketch not-prose"><div class="sketch-frame"><p><em>Figure: Five steps in a row. Build: the script's own Debug app with the store name. Per device: boot the app's own simulator and pin the status bar to 9:41. Per shot: reset and launch the app with debug arguments for the screen, language and sample player. Capture: simctl screenshot. Frame: add the caption and paper background at the exact App Store size. A loop runs from capture back to launch for every language and screen. Separately, the listing text is checked against App Store Connect's limits. <a href="https://zubin.dev/blog/app-store-screenshots-script/">See the drawing in the post.</a></em></p></div><figcaption>One command per app: build once, then loop over devices, languages and screens, then frame every capture.</figcaption></figure>
<p>It’s two steps, one shell script and one Python script, and they’re deliberately separate. Capturing is slow and needs a booted simulator. Framing is fast and only needs the PNGs, so I can tweak a caption or a color and reframe everything quickly without recapturing anything.</p>
<h2 id="step-1-make-the-app-screenshot-itself">Step 1: make the app screenshot itself</h2>
<p>The trick that makes capture scriptable is teaching the app to open anywhere, in any state, from its launch arguments. Every one of my apps has a small, <code>#if DEBUG</code>-only file that reads flags like these (Treble Trouble’s, prefixed <code>-tt-</code>) when it starts:</p>
<pre class="astro-code astro-code-themes zubin-light zubin-dark has-copy-btn" tabindex="0" data-language="sh"><code><span class="line"><span>-tt-reset</span><span> -tt-full</span><span> -tt-nosplash</span><span> -tt-player</span><span> Mia:cat</span><span> \</span></span>
<span class="line"><span>-tt-lang </span><span>ar</span><span> -tt-screen</span><span> lesson:treble-all</span><span> -tt-phase</span><span> practice</span></span></code></pre>
<p>That says: wipe saved state, unlock the full version, skip the splash screen, sign in as a sample player called Mia (with a cat avatar, so the player button shows), switch to Arabic, and open the “name the note” lesson in practice mode. There’s a flag for every screen and state a screenshot needs, plus <code>-tt-demo</code> to fill in believable progress and scores. None of it exists in Release builds.</p>
<p>With that in place, the capture script is a loop:</p>
<pre class="astro-code astro-code-themes zubin-light zubin-dark has-copy-btn" tabindex="0" data-language="sh"><code><span class="line"><span>for</span><span> device </span><span>in</span><span> iphone</span><span> ipad</span><span>;</span><span> do</span></span>
<span class="line"><span>  xcrun</span><span> simctl</span><span> boot</span><span> $sim</span></span>
<span class="line"><span>  xcrun</span><span> simctl</span><span> status_bar</span><span> $sim </span><span>override</span><span> --time</span><span> &quot;9:41&quot;</span><span> \</span></span>
<span class="line"><span>    --batteryState</span><span> charged</span><span> --batteryLevel</span><span> 100</span><span> --wifiBars</span><span> 3</span><span> --cellularBars</span><span> 4</span></span>
<span class="line"><span>  xcrun</span><span> simctl</span><span> install</span><span> $sim $APP</span></span>
<span class="line"><span>  for</span><span> lang </span><span>in</span><span> $LANGS</span><span>;</span><span> do</span></span>
<span class="line"><span>    for</span><span> screen </span><span>in</span><span> $SCREENS</span><span>;</span><span> do</span></span>
<span class="line"><span>      xcrun</span><span> simctl</span><span> terminate</span><span> $sim $BUNDLE</span></span>
<span class="line"><span>      xcrun</span><span> simctl</span><span> launch</span><span> $sim $BUNDLE </span><span>-tt-reset</span><span> -tt-lang</span><span> $lang $screen_args</span></span>
<span class="line"><span>      sleep</span><span> 4</span></span>
<span class="line"><span>      xcrun</span><span> simctl</span><span> io</span><span> $sim </span><span>screenshot</span><span> raw/</span><span>$device</span><span>/</span><span>$lang</span><span>/</span><span>$screen</span><span>.png</span></span>
<span class="line"><span>    done</span></span>
<span class="line"><span>  done</span></span>
<span class="line"><span>done</span></span></code></pre>
<p>A few details that took a while to get right:</p>
<ul>
<li><strong>Every shot starts from scratch.</strong> The app is terminated and relaunched with <code>-tt-reset</code> for every single screenshot, so nothing leaks from one shot into the next. It’s slower, but it means any screenshot can be retaken on its own. <code>ONLY=03 ./scripts/store-shots.sh</code> retakes just screen 3 in every language.</li>
<li><strong>The status bar is pinned.</strong> <code>simctl status_bar override</code> sets the time and fills the battery and signal bars, so every frame shows a clean status bar instead of whatever the Mac happened to be doing.</li>
<li><strong>Each app has its own simulators.</strong> Treble Trouble captures on simulators named for it (“TT iPhone 18 Pro Max” and “TT iPad Pro 13”). That sounds fussy, but it means two apps can capture at the same time without fighting over a device.</li>
<li><strong>The capture build is its own Debug build.</strong> My Debug builds normally install as a separate “Dev” app with a ribbon on its icon, so they can sit beside the App Store version. The screenshot script builds a copy with the store name instead, so nothing in the capture says “Dev”.</li>
<li><strong>The screen list lives in the script.</strong> Each entry is a file name and its launch arguments. Treble Trouble’s eighth screen even varies by language: it shows the other note-naming system, so solfège (Do Re Mi) where letters are the default, and letters where solfège is.</li>
</ul>
<h2 id="step-2-frame-them">Step 2: frame them</h2>
<p>The raw captures are just phone screens. The framing script turns each one into a store image at exactly the size Apple asks for (1320 × 2868 for a 6.9-inch iPhone, 2064 × 2752 for a 13-inch iPad): a paper background in the app’s style, a caption at the top, and the screenshot below it with rounded corners, a sticker-style shadow and a crayon outline.</p>
<p>Most of the script is about text, because captions in 15 languages are where things get interesting.</p>
<ul>
<li><strong>A font per script.</strong> Latin and Cyrillic captions use the app’s own rounded typeface. Japanese, Chinese, Korean and Hindi each get a system font that matches what the app uses on device.</li>
<li><strong>Right to left.</strong> Arabic and Hebrew are laid out right to left, using Pillow’s raqm text layout, which handles bidirectional text and Arabic letter shaping properly. Apple’s own Arabic and Hebrew fonts don’t include Latin letters or digits, and a caption like “C D E” needs both, so those two use a font that covers everything, made bold with a stroke.</li>
<li><strong>Line breaks that read well.</strong> Captions wrap onto at most two lines, and the script picks the break that makes the two lines most even, so there’s never one lonely word underneath. Japanese and Chinese wrap by character, preferring to break after a comma. Runs like “C D E” are kept together with non-breaking spaces.</li>
</ul>
<p>Then there’s the Dynamic Island. The Simulator draws it on some captures and not on others, so a set of framed screenshots would randomly have a black pill at the top of some of them. The framing script paints it out:</p>
<figure class="sketch not-prose"><div class="sketch-frame"><p><em>Figure: Left, a raw capture with the Dynamic Island drawn as a dark pill between the status bar items. A scan down the middle column finds the dark rows, then extends left and right to the pill's edges. Right, the framed shot: the pill's area is filled with the background color blended from either side, and the status bar is untouched. <a href="https://zubin.dev/blog/app-store-screenshots-script/">See the drawing in the post.</a></em></p></div><figcaption>The Simulator draws the island on some captures and not others. The framing script paints it out so all 240 frames match.</figcaption></figure>
<p>It scans down the middle column of the top few percent of the image for dark rows, walks left and right from each one to find the pill’s edges, and fills that area by blending the background colors from either side. It only touches the rows it found and never looks at the status bar icons, which sit well outside the pill.</p>
<h2 id="step-3-lint-the-listing">Step 3: lint the listing</h2>
<p>The screenshots are half of a store listing. The other half is text, and App Store Connect has strict limits: 30 characters for the name, 30 for the subtitle, 170 for promotional text, 100 for keywords and 4,000 for the description, in every language.</p>
<p>So the listing text lives in a script too, which writes out a paste-ready file and refuses to write it if anything is wrong:</p>
<ul>
<li>Every field in every language is checked against its limit.</li>
<li>Keywords can’t repeat words already in the name or subtitle, since those are indexed anyway.</li>
<li>No prices appear anywhere, per App Review’s rules on metadata.</li>
<li>Nothing may suggest that children are the main audience. These are learning apps, but they’re not in Apple’s Kids category, and App Review is strict about that line. The check is a regular expression of “kids” and “children” in all 15 languages, from <em>niños</em> and <em>enfants</em> to 子ども and أطفال.</li>
</ul>
<h2 id="the-one-rule-i-added-later">The one rule I added later</h2>
<p>A full pass is slow: for Treble Trouble that’s 240 launches, plus translations. So there’s a rule in each app’s notes for me and for the coding agents I work with: <strong>don’t regenerate store assets while a design is still changing.</strong> Say that they’ll need a refresh, wait until the design is settled, and then retake only the affected screens and languages. A quick single screenshot to check a layout is fine; a full pass is not.</p>
<h2 id="what-id-copy">What I’d copy</h2>
<ul>
<li><strong>Debug launch arguments for every screen and state.</strong> They’re useful far beyond screenshots, for UI tests and for checking layouts quickly.</li>
<li><strong>Separate capture from framing.</strong> Recapturing is slow; reframing should be instant.</li>
<li><strong>Pin everything that isn’t the app:</strong> the status bar, the device, the name on the icon, the sample data.</li>
<li><strong>Check the text with the same rigor as the code.</strong> Character limits and review rules are easy to encode and painful to discover in a rejection email.</li>
</ul>
<p>None of this is clever on its own. Together it means a design change costs me one command and a coffee, instead of a weekend in a design tool.</p>]]></content:encoded><dc:creator>Zubin Khavarian</dc:creator><category>ios</category><category>app-store</category><category>tooling</category></item><item><title>Stamp DEV on the Debug Icon</title><link>https://zubin.dev/blog/debug-build-own-app/</link><guid isPermaLink="true">https://zubin.dev/blog/debug-build-own-app/</guid><description>My Debug builds are their own app: a .dev bundle ID, a Dev name, and the real icon with a DEV ribbon a small script draws across the corner. They install beside the App Store version and never touch its data.</description><pubDate>Mon, 05 Oct 2026 12:00:00 GMT</pubDate><content:encoded><![CDATA[<p>Once one of my apps is on the App Store, I have the store version on my phone like anyone else. I also run Debug builds from Xcode on the same phone all day. If both use the same bundle ID, every Debug run replaces the store app, and they share one sandbox: my half-finished test data lands in the same place as the real progress, and I can never tell at a glance which build I’m tapping.</p>
<p>So in every one of my apps, the Debug build is a different app.</p>
<h2 id="three-build-settings">Three build settings</h2>
<p>The Debug configuration changes three things, and Release keeps the originals:</p>
<pre class="astro-code astro-code-themes zubin-light zubin-dark has-copy-btn" tabindex="0" data-language="plaintext"><code><span class="line"><span>                                   Debug                   Release</span></span>
<span class="line"><span>PRODUCT_BUNDLE_IDENTIFIER          dev.zubin.Mathness.dev  dev.zubin.Mathness</span></span>
<span class="line"><span>INFOPLIST_KEY_CFBundleDisplayName  Mathness! Dev           Mathness!</span></span>
<span class="line"><span>ASSETCATALOG_COMPILER_APPICON_NAME AppIcon-Dev             AppIcon</span></span></code></pre>
<p>A different bundle ID is a different app to iOS: it installs beside the store version, with its own sandbox and its own <code>UserDefaults</code>. The name says “Dev” under the icon. And the icon gets a ribbon.</p>
<p><img src="https://zubin.dev/_astro/dev-icons.U2hzdPPR_2jQbPn.webp" alt="Four App Store app icons in a row (Mathness, Treble Trouble, Solve It and Mahbanou), and below each the same icon with an orange, slightly see-through DEV ribbon across its top-left corner." loading="lazy" decoding="async" width="1160" height="608"></p>
<h2 id="the-ribbon-is-generated">The ribbon is generated</h2>
<p>Nobody draws <code>AppIcon-Dev</code> by hand. A small Swift script, shared by all my apps, copies the app’s icon set and draws the ribbon over every image in it. Each app’s icon script runs it right after rendering the real icon, so the two can’t drift apart.</p>
<figure class="sketch not-prose"><div class="sketch-frame"><p><em>Figure: An app icon with rounded corners and a diagonal DEV ribbon across its top-left corner, drawn to scale. The ribbon's center line is 27% of the icon's width in from the corner, it's 13% of the width thick, and it's 85% opaque, so it stays clear of the rounded corner and the artwork shows through. <a href="https://zubin.dev/blog/debug-build-own-app/">See the drawing in the post.</a></em></p></div><figcaption>The ribbon, to scale: clear of the rounded corner, and see-through.</figcaption></figure>
<p>A few details took more than one try:</p>
<ul>
<li><strong>It sits in the corner.</strong> The first version was a band across the bottom. The corner ribbon covers less of the art, and it stays inside the home screen’s rounded mask.</li>
<li><strong>It’s see-through.</strong> At 85% opacity you can still see what’s underneath, which matters when the icon is the only thing telling apps apart.</li>
<li><strong>Every variant gets one.</strong> iOS icons now come in light, dark and tinted versions. The tinted one is grayscale (iOS supplies the color), so its ribbon is white with black text instead of orange with white.</li>
<li><strong>Opaque stays opaque.</strong> If the source icon has no alpha channel, neither does the stamped one.</li>
</ul>
<h2 id="extensions-follow-the-app">Extensions follow the app</h2>
<p>For a plain app, those three settings are the whole job. <a href="https://zubin.dev/apps/mahbanou/">Mahbanou</a> has home screen widgets, an Apple Watch app and watch complications, and each is its own target with its own bundle ID. They all have to follow the app into <code>.dev</code>, or the build fails: an embedded target’s ID has to start with its app’s.</p>
<figure class="sketch not-prose"><div class="sketch-frame"><p><em>Figure: Mahbanou's four targets under each configuration. App Store: dev.zubin.Mahbanou, its Widgets, its watchkitapp and the watch's Widgets, sharing the app group group.dev.zubin.Mahbanou. Debug: the same four with .dev after Mahbanou, sharing group.dev.zubin.Mahbanou.dev. <a href="https://zubin.dev/blog/debug-build-own-app/">See the drawing in the post.</a></em></p></div><figcaption>Every target follows the app into .dev, and so does the app group.</figcaption></figure>
<p>The watch app also names its phone app (<code>WKCompanionAppBundleIdentifier</code>), so that setting gets a Debug value too.</p>
<p>The part that’s easy to miss is the app group. The widgets read the app’s settings from a shared container, and if Debug used the same group as the store app, the two would still share data through it. So the entitlements use a build setting instead of a literal:</p>
<pre class="astro-code astro-code-themes zubin-light zubin-dark has-copy-btn" tabindex="0" data-language="xml"><code><span class="line"><span>&lt;key&gt;</span><span>com.apple.security.application-groups</span><span>&lt;/key&gt;</span></span>
<span class="line"><span>&lt;array&gt;</span></span>
<span class="line"><span>  &lt;string&gt;</span><span>$(MAHBANOU_APP_GROUP)</span><span>&lt;/string&gt;</span></span>
<span class="line"><span>&lt;/array&gt;</span></span></code></pre>
<p><code>MAHBANOU_APP_GROUP</code> is <code>group.dev.zubin.Mahbanou.dev</code> in Debug, and the code that opens the container picks the same name under <code>#if DEBUG</code>.</p>
<h2 id="the-scripts-follow-too">The scripts follow too</h2>
<p>Everything that launches the app by ID has to know about <code>.dev</code>. The quick screenshot script and the App Store screenshot script both launch <code>dev.zubin.Mathness.dev</code>.</p>
<p>The store screenshots needed one more step. On iPad the app’s name shows in the status bar, so a capture of “Mathness! Dev” would put the wrong name on the store page. That script builds its own copy of the Debug app with the store’s name and icon, overriding the settings on the command line:</p>
<pre class="astro-code astro-code-themes zubin-light zubin-dark has-copy-btn" tabindex="0" data-language="bash"><code><span class="line"><span>xcodebuild</span><span> -project</span><span> Mathness.xcodeproj</span><span> -scheme</span><span> Mathness</span><span> \</span></span>
<span class="line"><span>  -destination</span><span> &#39;generic/platform=iOS Simulator&#39;</span><span> \</span></span>
<span class="line"><span>  -derivedDataPath</span><span> DerivedData/Store</span><span> \</span></span>
<span class="line"><span>  &quot;INFOPLIST_KEY_CFBundleDisplayName=Mathness!&quot;</span><span> \</span></span>
<span class="line"><span>  ASSETCATALOG_COMPILER_APPICON_NAME=AppIcon</span><span> build</span></span></code></pre>
<p>It keeps the <code>.dev</code> bundle ID, so the capture build never replaces anything, and it builds into its own derived data folder, so it doesn’t fight my everyday Debug build.</p>
<h2 id="what-stays-the-same">What stays the same</h2>
<p>Only Debug changes. TestFlight builds are archived with the Release configuration (Xcode’s default), so they keep the real ID, name and icon, and they update the store app the way a real release would. That’s what you want from a beta.</p>
<p>Purchases in Debug come from the local StoreKit configuration file in the scheme, so the different ID doesn’t matter there. The App Store’s sandbox wouldn’t find the real products under a <code>.dev</code> ID, which is one more reason to test real purchases in TestFlight.</p>
<h2 id="worth-copying">Worth copying</h2>
<ul>
<li><strong>Give Debug its own bundle ID</strong>, so it installs beside the store app with its own data.</li>
<li><strong>Change the name and the icon too.</strong> The name is what you read; the ribbon is what you spot.</li>
<li><strong>Generate the Dev icon from the real one</strong>, in the same script, so they never drift.</li>
<li><strong>Move every extension and app group with it</strong>, or the two apps will still share data.</li>
<li><strong>Grep your scripts for the bundle ID</strong> after the change.</li>
</ul>]]></content:encoded><dc:creator>Zubin Khavarian</dc:creator><category>ios</category><category>swift</category><category>app-store</category><category>tooling</category></item></channel></rss>