iPhone client for network-computer: see and drive a remote Linux/Mac desktop over WebRTC, phone as trackpad and keyboard, desktop on a TV via AirPlay.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/network-computer-ios.git
HTTPS
https://gitstable.com/git/askrobots/network-computer-ios.git
SSH
ssh://git@gitstable.com:2222/askrobots/network-computer-ios.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Dan Quellhorst First cut of the iPhone client cc1f67f 2 months ago History
README.md

network-computer-ios

iPhone client for network-computer: see and drive a remote Linux or Mac desktop over WebRTC, with the phone as trackpad and keyboard, and the desktop on a TV through AirPlay or a USB-C display.

Status: first cut. Connects through nc-rendezvous with the same signaling as the browser client, renders H.264 in hardware, sends touch, software keyboard, hardware keyboard and modifier-bar input, and puts the video on an external display when one is connected. Microphone, camera and file transfer are not wired up yet.

Build

Requires Xcode 16 or newer and XcodeGen (brew install xcodegen). The Xcode project is generated, not committed.

git clone https://github.com/askrobots/network-computer-ios
cd network-computer-ios
./bootstrap.sh            # creates Local.xcconfig from the example and runs xcodegen

Put your Apple Team ID in Local.xcconfig (it is gitignored) and change the bundle id prefix if you are not askrobots. Open NetworkComputer.xcodeproj, pick your phone, run. A free Apple account works for sideloading; the app expires after 7 days and must be re-run from Xcode.

Use

  1. Run nc-rendezvous and nc-host from the Go repo.
  2. In the app enter the rendezvous URL, user, password, pick the host, enter its PIN.
  3. Connect. One finger moves the pointer, tap clicks, two-finger tap right-clicks,

two-finger drag scrolls, long-press then drag drags. The keyboard button opens the software keyboard; ctrl, alt and cmd on the bar are sticky.

  1. Start Screen Mirroring to an Apple TV, or plug in a display: the desktop moves to

the TV and the phone becomes the trackpad.

What is kept out of git

Local.xcconfig (Team ID, bundle id), the generated .xcodeproj, xcuserdata, provisioning profiles, certificates and App Store Connect keys are all ignored. The rendezvous password and host PIN are stored in the iOS Keychain, never in code or UserDefaults. NSAllowsArbitraryLoads is on so a plain-http rendezvous on a LAN works during development; use the rendezvous TLS option for anything public.

Layout

project.yml            XcodeGen spec (targets, Info.plist keys, WebRTC package)
Sources/App            app and scene delegates, external display scene
Sources/Signaling      rendezvous WebSocket client, message types
Sources/Session        WebRTC peer, session state
Sources/Input          key mapping, key capture, trackpad gestures
Sources/Views          connect screen, session screen, video view
Sources/Support        settings, keychain

WebRTC comes from stasel/WebRTC, a Swift package of Google's BSD-licensed libwebrtc built from source.

License

MIT. See LICENSE.