Overview
PreviewsMCP's core — compiling SwiftUI outside Xcode, loading dylibs at runtime, literal diffing for state-preserving hot-reload — is unique in the ecosystem. Several existing tools solve narrower problems that PreviewsMCP could subsume or improve upon.
This issue tracks research into each tool's approach and how PreviewsMCP could incorporate or replace their functionality.
1. InjectionNext / InjectionIII — Hot reload into running apps
What they do: Watch source files, recompile, swap function implementations via dyld_dynamic_interpose. Works with any Swift code.
Their limitations:
- Function interposing is fragile, breaks with compiler optimizations
- Requires
@objc dynamic in some cases
- Struggles with Swift 6 strict concurrency
- No literal-only fast path (always recompiles)
How we could replace:
- SwiftUI views are value types — swap the View type via
dlopen instead of interposing functions
- Our literal-only path (LiteralDiffer) preserves
@State without recompilation — InjectionNext can't do this
- Need: lightweight client library for embedding in user's app, compile against app's module for
@EnvironmentObject / Core Data access
Research tasks:
2. XcodeBuildMCP (Sentry) — Build/test/deploy MCP server
What they do: 59 MCP tools covering xcodebuild, simulator control, screenshots, test running, code signing, App Store Connect. Most comprehensive iOS MCP server.
Their limitations:
- Requires Xcode for everything
- Simulator screenshots are generic (not preview-aware)
- No
#Preview parsing, compilation, or rendering
- No hot-reload
- No accessibility tree inspection tied to preview context
How we could complement/compete:
- We're the superior preview engine — they could delegate to us for preview workflows
- We could expand to cover more of their build/test surface (xcodebuild integration already partially exists via our Xcode build system support)
- Our accessibility tree + touch injection is more targeted than their generic simulator interaction
Research tasks:
3. ios-simulator-mcp — Simulator interaction
What they do: MCP server for iOS simulator screenshots, UI element inspection, touch simulation, app install/launch.
Their limitations:
- No compilation or preview rendering
- Simulator interaction only (no macOS)
- No hot-reload
- No build system awareness
How we already replace:
- PreviewsMCP is a strict superset — we do everything they do plus compilation, preview rendering, hot-reload, and build system integration
- Our touch injection uses the Hammer approach (in-app IOHIDEvent), likely more reliable than their approach
Research tasks:
4. SnapshotPreviews (Emerge Tools) — Preview snapshot testing
What they do: Automatically discover and snapshot all #Preview blocks in a project via XCTest. Includes Preview Gallery app for browsing previews on device.
Their limitations:
- Requires Xcode's build pipeline and XCTest target
- Can't run in CI without Xcode
- Tightly coupled to Xcode's preview infrastructure
- No hot-reload or interactive preview
How we could replace:
previewsmcp snapshot --all that walks source files, discovers #Preview blocks, and snapshots each one
- Runs without Xcode — works in headless CI (Linux runners with cross-compilation?)
- Could output a static HTML gallery (like their Preview Gallery but without a device)
- Our build system integration (SPM, Bazel, Xcode) means we can compile cross-file dependencies
Research tasks:
5. Prefire — Snapshot test generation from #Preview
What they do: Auto-generate snapshot tests and Playbook views from #Preview macros. Uses SourceKit for preview discovery.
Their limitations:
- Generates XCTest code that still needs Xcode to run
- Code generation step adds complexity
- No standalone rendering
How we could replace:
- Same approach as SnapshotPreviews above — direct rendering without XCTest
- Our PreviewParser already does preview discovery without SourceKit
- Could generate snapshot diffs for PR reviews (before/after screenshots)
Research tasks:
6. Blitz — Device management + App Store Connect MCP
What they do: Native macOS app with MCP servers for simulator/iPhone management, builds, App Store Connect submission. 30+ tools.
Their limitations:
- No preview rendering or compilation
- Requires their native Mac app
- Simulator control is generic, not preview-aware
How we relate:
- Mostly orthogonal — they focus on deployment pipeline, we focus on development inner loop
- Their simulator control overlaps but is less specialized
- No need to compete on App Store Connect / device management
Research tasks:
7. Xcode 26.3 native MCP — Apple's first-party AI integration
What they do: Built-in Claude Agent SDK and OpenAI Codex in Xcode. MCP support for external tool servers. Can capture Xcode Previews for visual verification.
Their limitations:
- Requires Xcode to be running
- Preview rendering tied to Xcode's canvas
- Can't run headless or in CI
- Closed source, no customization
How we differentiate:
- PreviewsMCP works without Xcode — editors like VS Code, Cursor, Zed, terminals, CI
- Headless operation for automated testing and AI agents
- Open source and extensible
- Faster iteration cycle (no Xcode canvas overhead)
Research tasks:
Priority
Suggested order of investigation based on impact:
- InjectionNext replacement — highest impact, broadest audience, technically novel
- SnapshotPreviews/Prefire replacement — clear CI use case, batch
--all mode
- ios-simulator-mcp — we already replace this, just need to communicate it
- XcodeBuildMCP — evaluate complement vs compete
- Xcode 26.3 — positioning and differentiation
- Blitz — mostly orthogonal, low priority
Overview
PreviewsMCP's core — compiling SwiftUI outside Xcode, loading dylibs at runtime, literal diffing for state-preserving hot-reload — is unique in the ecosystem. Several existing tools solve narrower problems that PreviewsMCP could subsume or improve upon.
This issue tracks research into each tool's approach and how PreviewsMCP could incorporate or replace their functionality.
1. InjectionNext / InjectionIII — Hot reload into running apps
What they do: Watch source files, recompile, swap function implementations via
dyld_dynamic_interpose. Works with any Swift code.Their limitations:
@objc dynamicin some casesHow we could replace:
dlopeninstead of interposing functions@Statewithout recompilation — InjectionNext can't do this@EnvironmentObject/ Core Data accessResearch tasks:
HotReload { }wrapper view that loads from PreviewsMCP dylibs2. XcodeBuildMCP (Sentry) — Build/test/deploy MCP server
What they do: 59 MCP tools covering xcodebuild, simulator control, screenshots, test running, code signing, App Store Connect. Most comprehensive iOS MCP server.
Their limitations:
#Previewparsing, compilation, or renderingHow we could complement/compete:
Research tasks:
3. ios-simulator-mcp — Simulator interaction
What they do: MCP server for iOS simulator screenshots, UI element inspection, touch simulation, app install/launch.
Their limitations:
How we already replace:
Research tasks:
4. SnapshotPreviews (Emerge Tools) — Preview snapshot testing
What they do: Automatically discover and snapshot all
#Previewblocks in a project via XCTest. Includes Preview Gallery app for browsing previews on device.Their limitations:
How we could replace:
previewsmcp snapshot --allthat walks source files, discovers#Previewblocks, and snapshots each oneResearch tasks:
--allflag that walks a project and snapshots every#Preview5. Prefire — Snapshot test generation from #Preview
What they do: Auto-generate snapshot tests and Playbook views from
#Previewmacros. Uses SourceKit for preview discovery.Their limitations:
How we could replace:
Research tasks:
6. Blitz — Device management + App Store Connect MCP
What they do: Native macOS app with MCP servers for simulator/iPhone management, builds, App Store Connect submission. 30+ tools.
Their limitations:
How we relate:
Research tasks:
7. Xcode 26.3 native MCP — Apple's first-party AI integration
What they do: Built-in Claude Agent SDK and OpenAI Codex in Xcode. MCP support for external tool servers. Can capture Xcode Previews for visual verification.
Their limitations:
How we differentiate:
Research tasks:
Priority
Suggested order of investigation based on impact:
--allmode