Housekeeping. No API changes and no behaviour changes — a drop-in update from 0.1.0.
Swift 6 strict concurrency
The library now builds warning-free. Five diagnostics that the compiler flags as errors under the Swift 6 language mode are gone:
- Two "reference to captured var
self". A weak capture is avar, because it can become nil, and the queue hop nested inside a stream's termination handler was reading one from concurrently-executing code. The reference is now promoted to a strong local before the hop — which also means that once termination has established the object is alive, the cleanup is guaranteed to run instead of quietly becoming a no-op partway through. - Two non-Sendable closure captures. The resumption callback behind
Connection's suspension helpers, and the work handed to the connection's scheduler, both cross into@Sendableclosures. Both are now declared@Sendable, which states what was already true rather than changing it. DispatchWorkItemin aSendabletype. It is not Sendable-audited, but cancelling one from another thread is precisely what it is for, and cancelling is all the wrapper does with it. The assumption is now stated with@preconcurrencyat theDispatchimport, matching how the CoreBluetooth imports handle the same problem.
None of this touches the isolation design. Mutable state still lives in queue-confined classes reached through one serial queue that is both CoreBluetooth's queue and the actors' executor, and the deployment floor is still iOS 16.
Documentation
Removed the last references to the development plan, which is not part of the repository. Comments that cited it are rewritten rather than stripped, so the reasoning they carried is still there.
Requirements
Unchanged: iOS 16+, Swift 5.9+, Swift Package Manager.
.package(url: "https://github.com/vilimets/AsyncBLE-Swift.git", from: "0.1.1")