Fleet changelogs · dev.ecs0.net
rdmbair15m5-changelog-20260915-2318-scanroo-ios-macos-capture-cloudkit-library

rdmbair15m5-changelog-20260915-2318-scanroo-ios-macos-capture-cloudkit-library

Completed core iOS document scanning functionality, image processing pipeline (homography, shadow stripping, curvature dewarping, Sauvola binarization), camera roll saving, 300 DPI searchable PDF generation, CloudKit cross-platform sync engine, and macOS document library with date-descending sorting, instant search, batch export to PDF/Photos, and intelligent OCR renaming.

Scope

Key Capabilities Implemented

  1. iOS Document Capture & Processing Pipeline:

    • 60fps AVFoundation capture feed with zero-copy planar Y luminance analysis (kCVPixelFormatType_420YpCbCr8BiPlanarFullRange).
    • Real-time HUD contour overlay with 3 distinct states: searching (yellow dashed), tracking (orange solid), and locked (emerald green glow with progress bar).
    • Sensor fusion stability monitor combining CoreMotion (gyro < 0.08 rad/s, accel < 0.05g), optical corner displacement (< 0.005), and Tenengrad focus sharpness (> 0.70) driving 600ms dwell auto-shutter.
    • 4-point projective homography transformation (CIPerspectiveCorrection & Accelerate vImage) rectifying standard paper and odd-sized documents (W-2 forms, receipts, business cards, whiteboards).
    • Multi-stage image enhancement: illumination leveling (CIColorControls + bilateral high-frequency recovery), specular reflection suppression, Sauvola adaptive binarization (Crisp B&W), curvature dewarping, and micro-text sharpening.
    • Interactive crop review screen with 4 draggable corner handles (touch target >= 44pt) and a floating 2.5x circular magnified loupe with crosshair reticle offset 75pt vertically above touch point.
    • Zero-lag default saving to iOS Camera Roll (PHPhotoLibrary .addOnly) in dedicated "ScanRoo" album.
    • 300 DPI searchable PDF export with embedded invisible CoreText text layer accurately aligned with OCR word bounding boxes.
  2. CloudKit Cross-Platform Synchronization:

    • CloudKitRecordMapper: Bidirectional mapping between ScanDocument, ScanPage, ScanAsset and custom CKRecord types in ScanRooZone with CKAsset binary file attachments.
    • LiveCKSyncEngineManager: Concrete sync client implementing staging, dispatch, silent push subscriptions (CKDatabaseSubscription), and remote notification handling.
  3. macOS Document Library, Search & Export:

    • Document browser sorted strictly date taken descending (createdAt descending, newest scans at the top).
    • Instant search/lookup filtering across titles, dates, tags, and OCR recognized text.
    • Single and multi-selection batch export to individual searchable PDF files.
    • Single and multi-selection batch export directly to Apple Photos.
    • Intelligent OCR renaming: analyzes OCR text and document classification to automatically detect W-2 tax years (e.g. "W-2 Tax Statement 2025") and receipt merchant names (e.g. "Acme Corp Receipt").

Verification Evidence

How to Undo