In my app, I use AVFoundation
to snap images of certain frames of video files. I cache those images by their frame number. I do this with TaskGroup
and concurrency. Here's an extremely simplified example that shows the error I'm fighting:
CGImage
explicitly conforms to @unchecked Sendable
for macOS 10.9+ and the documentation declares it to be thread-safe. But using it here produces this warning/error and this is the last error stopping me from adopting Swift 6 language mode in this project.
If I replace CGImage
with some other Sendable
type, the error disappears, of course. But I want CGImage
because I take each of these and run them through the Vision
framework to find text snippets, and Vision
requires CGImage
inputs.
I'm running Xcode 16 Beta 2.