manolofdez / AsyncBluetooth

A small library that adds concurrency to CoreBluetooth APIs.
MIT License
160 stars 30 forks source link

Add Sendable for strict concurrency set to complete in Xcode compiler settings #57

Closed Dan1973KS closed 1 month ago

Dan1973KS commented 1 month ago

When compiler´s settings "Strict concurrency" set to "complete", the compiler complains about Peripheral and CentralManager not being sendable. Is it possible to let the be conforming to Sendable protocol?

manolofdez commented 1 month ago

Hi! This is a little tricky because the underlying types are not themselves Sendable (e.g. CBPeripheral, CBService, etc). I'm looking into it, but in the meantime we'll have to make do with @preconcurrency import AsyncBluetooth to silence the errors.

manolofdez commented 1 month ago

Rolled out a temporary fix for now: CoreBluetooth will be internally imported with the @preconcurrency attribute. Note this is a breaking change: AsyncBluetooth 2.0.0. I've updated the cookbook with the changes too.

Dan1973KS commented 1 month ago

Thanks, man!That’s what I guessed. I wonder when will Apple fix all those kinds of issues in their vast amount of frameworks…? - Before the release of Swift 6!Am 04.08.2024 um 23:08 schrieb Manuel Fernandez @.***>: Closed #57 as completed.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>