swiftui-cached-async-image
swiftui-cached-async-image copied to clipboard
"[…] cannot be marked as '@Sendable'"
With Xcode 15.3, I get this warning on the load()
method.
Instance methods of non-Sendable types cannot be marked as '@Sendable'; this is an error in Swift 6
I think you can simplely change the usage to
content(phase) .task(id: urlRequest) { await load() }
And then remove @Sendable, warning would be gone.
That solved the warning, and my code seems to work all right!
Thanks @wyk111wyk 🙌