
swift 6, screencapturekit, and why my app worked in xcode but not as a .app
Swift 6, ScreenCaptureKit, and why my app worked in Xcode but not as a .app I created this post for the purposes of entering the Gemini Live Agent Challenge. I'm building VibeCat , a desktop AI companion that watches your screen and talks to you. The backend was done. Nine agents, WebSocket proxy, Gemini Live API integration — all working. Time to build the macOS client. Swift 6. SwiftUI. ScreenCaptureKit. How hard could it be? Three days. Three days of things silently not working, with zero error messages. the screen capture that captured nothing VibeCat needs to see your screen to be useful. The VisionAgent on the backend analyzes screenshots to detect errors, notice you're stuck, or see tests pass. So the client needs ScreenCaptureKit. The code itself is clean: @MainActor final class ScreenCaptureService { func captureAroundCursor () async -> CaptureResult { do { let image = try await performCapture ( fullWindow : false ) if ! ImageDiffer . hasSignificantChange ( from : lastImage ,
Continue reading on Dev.to
Opens in a new tab




