DEV Community

Apoorv Darshan
Apoorv Darshan

Posted on

I open-sourced my iPhone screenshot tool — here's the architecture

TetherShot is a tiny macOS menu-bar app that captures pixel-perfect iPhone screenshots into a folder you choose and onto your clipboard. It's now fully MIT, so here's how it actually works under the hood — and where you can help.

Two capture paths:

  • USB: it flips the CoreMediaIO AllowScreenCaptureDevices flag, which makes the iPhone appear as a .muxed AVCaptureDevice. Native AVFoundation, full resolution, zero setup.
  • Wi-Fi: cable-free over Apple's developer-services RemoteXPC tunnel (via pymobiledevice3). A tiny root tunneld LaunchDaemon keeps the tunnel alive, so captures need no sudo — and it works even when the phone is locked.

The war story: my first version mirrored over AirPlay into ScreenCaptureKit. On macOS Tahoe the mirrored window blacks out the instant a capture context goes active. The dev-services framebuffer path is what shipped.

No account, no analytics, no servers. Just a real framebuffer grab at 1179x2556.

npm install -g tethershot
tethershot install
Enter fullscreen mode Exit fullscreen mode

If CoreMediaIO internals or device tunneling sound fun, the repo is open and PRs are welcome.

Code (MIT): https://github.com/apoorvdarshan/TetherShot

Top comments (0)