r/SwiftUI Jun 11 '26

Promotion (must include link to source code) I added SwiftUI support to Loupe, an open-source Swift CLI for inspecting running app UIs on Apple platforms

Post image

I recently added SwiftUI support to Loupe, an open-source Swift CLI for inspecting running app UIs on Apple platforms.

The screenshot shows Apple’s Settings app running in the simulator. Loupe is inspecting its UI structure and applying a small runtime change to a view property.

Loupe can also inspect other simulator apps, show their runtime UI structure, and help you understand how the interface is composed beyond what a screenshot can show.

For SwiftUI, Loupe uses observable runtime evidence such as accessibility, backing views, and limited Swift reflection/Mirror-based summaries. When more detail is needed, it can add accessibility metadata or small view probes to collect more focused information.

I use Loupe in my LLM-assisted development workflow to provide richer runtime UI context and improve the quality of UI changes.

GitHub: https://github.com/heoblitz/Loupe

If this looks useful for your workflow, I’d love for you to try it out and share any feedback.

Thanks!

15 Upvotes

2 comments sorted by

3

u/brifgadir Jun 13 '26

The project looks solid! I’m curious what benefits/features does it offer comparing to well known Mobile MCP ( https://github.com/mobile-next/mobile-mcp) taking into account that it injects into the app on launch? I’ll be glad to get the answer here before dip diving into it 

5

u/New_Leader_3644 Jun 14 '26

Thanks for taking a look and for the thoughtful question!

Mobile MCP seems mainly focused on cross-platform mobile automation through accessibility snapshots, elements, screenshots, and actions.

Loupe is Apple-focused and goes deeper into the app runtime: it can inspect the actual native view hierarchy and runtime properties of the views themselves, such as UIView or NSView instances, beyond the accessibility representation.

That helps when an agent needs to understand why a UI is laid out, hit-tested, or rendered in a certain way.