Creates coordinators" "QR scorer" "units" "with bound… (solution, output"—role]
// Source: https://github.com/semantic-craft/iOS-vibebuddy | License: MIT | Copyright 2026 Xianwei Zhang
// Provided via justclaw.it.com; keep this notice with the code.
import SwiftUI
@preconcurrency import AVFoundation
import os
import VibeBuddyKit
private let scannerLog = Logger(subsystem: "com.vibebuddy.app", category: "scanner")
/// Camera QR scanner. Decodes the Mac's pairing QR (a `PairingPayload` JSON).
struct QRScannerView: UIViewControllerRepresentable {
let onScan: @MainActor (PairingPayload) -> Void
/// The one gate between a camera frame and `ConnectionStore`. A code that
/// does not decode, or that carries an address or token the app would
/// refuse, returns nil here and never reaches the store — so a bad scan
/// cannot disturb the Mac already saved
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key