NewCode with Beto MCP

Duo

Control your Mac from your phone. Study a native SwiftUI remote with desktop streaming, a trackpad, a full keyboard, dictation, and a Mac companion.

Control your Mac from your phone

Check an AI conversation, make a quick change in a video project, or open the browser without returning to your desk. Duo puts your Mac desktop above familiar controls on your iPhone or iPad, with layouts that adapt to regular iPhone screens and different iPhone Duo poses.

This is a native SwiftUI project with two apps: the mobile remote and Duo Companion for Mac. Your devices connect over the same local network. The Mac stays awake and signed in; there is no internet relay or Duo account to set up.

What is inside

  • Desktop control: live Mac screen sharing, pinch to zoom, scrolling, clicks, and dragging with the trackpad.
  • A full keyboard: familiar Mac keys, held-key combinations, and configurable shortcuts to installed Mac apps.
  • Reviewed dictation: on-device transcription into an editable draft. Send it with Type on Mac when it is ready.
  • Local pairing: QR setup, authenticated encrypted transport, Keychain credentials, and explicit Mac screen and input permissions.
  • A paid utility flow: benefit-led onboarding, a localized one-time price, and StoreKit 2 purchase and restore handling.

What you can learn

Follow a screen frame from ScreenCaptureKit on the Mac through Network.framework to the phone. Explore how the app bounds streaming work, forwards pointer and keyboard events, and releases held input when a connection ends.

The speech flow uses Apple's SpeechAnalyzer and SpeechTranscriber, including model preparation, provisional results, interruption handling, and review before sending. The repository also includes focused tests, release checks, and verification notes.

Run it

  1. Clone the private repository and open in Xcode 27.1 or later.
  2. Build the DuoCompanion scheme for Mac and the Duo scheme for iPhone or iPad. Select your own development team for device builds.
  3. Install the companion in Applications, allow Screen Recording and Accessibility, and pair both devices on the same local network.

The apps require iOS 26 and macOS 26 or later. iPhone Duo fold APIs require iOS 27.1; earlier systems use the adaptive geometry fallback. Signing credentials are not included.

Included with Pro

Pro members get the complete Duo source through the private Code with Beto GitHub organization, alongside the other premium projects and courses. Pro source-code access and the consumer app purchase are separate: you do not need Pro to use the released app.

Get Started Today

Get access now and explore how Duo connects two native apps.

Pro members can use Visit repo above. For access questions or feedback, email beto@codewithbeto.dev.