CIFormat static var

CIFormat static var such as RGBA16 give concurrency warnings:

Reference to static property 'RGBA16' is not concurrency-safe because it involves shared mutable state; this is an error in Swift 6

Should all these formats be static let to suppress the warnings (future errors)?

Answered by FrankSchlegel in 790370022

The static properties on CIFormat are lets now in iOS 18 / macOS 15. 👍

Should all these formats be static let to suppress the warnings (future errors)?

Yes, assuming you were writing this code yourself.

As to what should happen with CIFormat specifically, that’s a bit tricky because it’s tied to how Swift imports C declarations and the source and binary compatibility constraints of that type. I expect that a lot of these problems will be resolved in the Apple platform SDKs that accompany Swift 6. However, it’s hard to say anything for sure because that’s The Future™ [1].

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] And I can’t predict the future. See Quinn’s Top Ten DevForums Tips.

The static properties on CIFormat are lets now in iOS 18 / macOS 15. 👍

CIFormat static var
 
 
Q