Noureddine RAMDI / ios-marketing-capture: in-app screenshot automation for SwiftUI iOS apps

Created Mon, 04 May 2026 10:23:02 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

ParthJadhav/ios-marketing-capture

Automating App Store marketing screenshots for iOS apps is notoriously tricky. Most tools rely on UI testing frameworks like XCUITest or Fastlane, which introduce fragile dependencies and limited rendering capabilities. ios-marketing-capture takes a different route: it injects debug-only code directly into the app process, gaining native access to ViewModels, SwiftData, and SwiftUI’s ImageRenderer. This approach enables precise, element-level screenshot captures and automated locale testing without the overhead and brittleness of traditional UI tests.

what ios-marketing-capture does and how it works

ios-marketing-capture is a skill package designed for AI coding agents that automates the generation of marketing screenshots for SwiftUI iOS apps. Instead of driving the app from the outside with UI automation, it embeds a DEBUG-gated capture system inside the app itself. This system has direct access to the app’s internal state and rendering capabilities, allowing it to capture not only full screens but also isolated UI components like widgets, cards, and charts.

At its core, the repo implements a step-based coordinator pattern. This coordinator programmatically navigates the app’s screens in a controlled sequence, ensuring consistent state and views for each screenshot step. The capture system uses SwiftUI’s ImageRenderer to produce high-resolution (3x scale) images with transparency, which is essential for marketing assets.

Locale handling is automated via a shell script that loops through configured locales. It uses simctl launch with -AppleLanguages arguments to run the app in different languages and regions, capturing localized screenshots without manual intervention.

The architecture is tightly coupled with Xcode 16+ and iOS 17+ features, including the use of @Observable for reactive data and the new SwiftUI ImageRenderer API. Python 3 is used by the shell script for JSON parsing, bridging the automation scripting with simulator control.

technical strengths and tradeoffs

The defining strength of ios-marketing-capture lies in its in-app capture approach. By injecting debug-only code directly into the running app, it avoids the common pitfalls of external UI testing frameworks:

  • Direct access to internal state: Unlike XCUITest, which interacts via accessibility layers, this method hooks into actual ViewModels and SwiftData stores, ensuring precise control over what is rendered.

  • Element-level rendering: The use of SwiftUI’s ImageRenderer allows for capturing isolated UI elements with transparency at a high scale. This is something UI testing frameworks cannot produce reliably.

  • Locale automation: Rather than manually switching languages or relying on fragile UI scripts, the shell script automates locale changes at the launch level, improving coverage and reducing manual errors.

That said, there are tradeoffs and limitations:

  • Requires debug build injection: The capture code is gated behind a DEBUG flag, so this won’t run in production builds. This requires managing build configurations carefully.

  • Tied to latest Apple tooling: The approach requires Xcode 16+, iOS 17+, and simulator runtimes matching the target version. This limits its applicability to the latest Apple platforms.

  • Simulator-focused: The automation runs on simulators using simctl. Real device capture or CI environments without simulators might need custom adaptations.

  • Complex setup: Injecting capture logic and coordinating navigation steps programmatically demands understanding of the app’s internal architecture.

Despite these tradeoffs, the code is surprisingly clean and pragmatic. The repo also documents 11 real-world gotchas encountered during production use with the Bloom coffee app, which lends valuable insight into practical challenges.

quick start with ios-marketing-capture

This repo is designed to be added as a skill to AI coding agents or manually cloned for integration. Installation commands are provided as follows:

npx skills add ParthJadhav/ios-marketing-capture

To install globally across projects:

npx skills add ParthJadhav/ios-marketing-capture -g

Or for a specific AI agent:

npx skills add ParthJadhav/ios-marketing-capture -a claude-code

Manual installation is also supported:

git clone https://github.com/ParthJadhav/ios-marketing-capture ~/.claude/skills/ios-marketing-capture

Requirements include Xcode 16+, iOS 17+ deployment target, a matching simulator runtime, and Python 3 for the shell script.

Once installed, the shell script handles looping through locales and launching the app in the simulator with proper language settings. The debug code inside the app coordinates screen navigation and captures screenshots programmatically.

verdict

ios-marketing-capture is a pragmatic tool tailored for SwiftUI iOS developers who want automated, high-fidelity marketing screenshots without the brittleness and limitations of traditional UI test frameworks. Its in-app injection approach offers access to internal app state and rendering APIs that UI automation can’t reach, enabling element isolation and locale automation that would otherwise be cumbersome.

The tradeoff is its reliance on the latest Apple tooling and the need for debug build instrumentation, which might not fit all CI/CD pipelines or workflows. It’s best suited for teams comfortable with SwiftUI internals and simulator scripting, looking for robust screenshot automation integrated into their app.

If you’re shipping SwiftUI apps with complex UI components and internationalization, and you’ve struggled with flaky UI tests or manual screenshot chores, ios-marketing-capture offers a clean, code-centric solution worth exploring.


→ GitHub Repo: ParthJadhav/ios-marketing-capture ⭐ 235 · Shell