Post

Replies

Boosts

Views

Activity

Type ReferenceWritableKeyPath does not conform to the 'Sendable' protocol
This is not a question but more of a hint where I was having trouble with. In my SwiftData App I wanted to move from Swift 5 to Swift 6, for that, as recommended, I stayed in Swift 5 language mode and set 'Strict Concurrency Checking' to 'Complete' within my build settings. It marked all the places where I was using predicates with the following warning: Type '' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode I had the same warnings for SortDescriptors. I spend quite some time searching the web and wrapping my head around how to solve that issue to be able to move to Swift 6. In the end I found this existing issue in the repository of the Swift Language https://github.com/swiftlang/swift/issues/68943. It says that this is not a warning that should be seen by the developer and in fact when turning Swift 6 language mode on those issues are not marked as errors. So if anyone is encountering this when trying to fix all issues while staying in Swift 5 language mode, ignore those, fix the other issues and turn on Swift 6 language mode and hopefully they are gone.
1
0
248
Oct ’24