0e25dbeba491cc675574e90287dc2f8d5400a783
The earlier UIKeyInput conformance was declared in a separate extension. ObjC protocol conformance via Swift extension is fragile when the protocol inherits another @objc protocol (UIKeyInput inherits UITextInputTraits) — the runtime didn't always pick up insertText:, so the on-screen keyboard came up but characters never reached controller.type(_:). Fix: declare UIKeyInput conformance directly on FramebufferUIView's class declaration, with insertText / deleteBackward / hasText as native members. Also caught and fixed by the new UI test: - The toolbar's keyboard-icon button had a 20×13 hit region (SF Symbol size) even though the visual frame was 34×34 — XCUI taps couldn't land on it reliably. .contentShape(Rectangle()) widens the hit area to the frame. - accessibilityValue is reserved by iOS for UIKeyInput-classed views (treats them as TextView), so a separate hidden "fb-diag" accessibility probe records keyboard plumbing events for the test to verify. Tests: - KeyboardInputTests (5): pure mapping from String → X11 keysym down/up pairs - ScreensUITests.testSoftwareKeyboardSendsCharactersToFramebuffer: opens a session, taps the keyboard toggle, types "hi" via the system keyboard, and asserts the framebuffer's diagnostic probe records [ins:h] and [ins:i] — proving the chars reach controller.type(_:) - A SwiftUI state probe (sessionview-state) verifies the binding flips, which guards against future tap-routing regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Screens (working title)
A VNC / RFB remote-desktop client for iPhone and iPad, modeled on Screens by Edovia. See /Users/treyt/.claude/plans/i-want-to-make-sprightly-pike.md for the full plan.
The name "Screens" is owned by Edovia. Pick a different App Store name before any public release.
Layout
Screens/
├── Screens/ # iOS app target (thin shell: @main, RootView, AppStateController)
├── Packages/
│ ├── VNCCore/ # Protocol + transport + storage. Tested with `swift test`.
│ └── VNCUI/ # SwiftUI views + UIKit framebuffer. Tested in-simulator.
├── Project.yml # xcodegen project definition — generates the .xcodeproj
├── README.md
└── .gitignore
Setup
- Install xcodegen:
brew install xcodegen - Generate the Xcode project from the repo root:
xcodegen generate - Open
Screens.xcodeprojin Xcode 16+. First open resolves the RoyalVNCKit SPM dependency. - Select an iOS 18 simulator (or a signed device) and run.
Testing
# Fast unit tests (no simulator)
cd Packages/VNCCore && swift test
cd Packages/VNCUI && swift test
# Full app + UI tests (simulator)
xcodebuild -project Screens.xcodeproj -scheme Screens -destination 'platform=iOS Simulator,name=iPhone 16' test
Phase 0 status
Scaffold only. Tapping a saved connection starts a SessionController but it only opens the TCP socket — no RFB handshake yet. Phase 1 wires RoyalVNCKit into SessionController and implements framebuffer rendering.
Dependencies
- RoyalVNCKit (MIT) — RFB protocol, encodings, auth.
- Apple first-party only:
Network,SwiftData,Security,UIKit,SwiftUI,Observation.
Description
Languages
Swift
100%