A Swift library that provides async/await APIs and thread-safe concurrency for Apple's CoreBluetooth framework.
AsyncBluetooth is a Swift library that adds modern async/await concurrency to Apple's CoreBluetooth framework. It solves the problem of callback-heavy Bluetooth Low Energy (BLE) development by providing thread-safe, sequential APIs that integrate naturally with Swift's concurrency model. The library handles command queueing, data parsing, and Bluetooth state management while maintaining full compatibility with existing CoreBluetooth functionality.
iOS and macOS developers building Bluetooth Low Energy applications who want to use Swift's async/await syntax instead of delegate patterns. Particularly useful for developers working with multiple BLE peripherals or complex communication sequences.
Developers choose AsyncBluetooth because it dramatically simplifies BLE code by eliminating callback pyramids and providing type-safe data conversion. Unlike manual CoreBluetooth implementations, it handles thread safety and operation sequencing automatically while offering convenience APIs that reduce boilerplate code.
A small library that adds concurrency to CoreBluetooth APIs.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Replaces CoreBluetooth's delegate patterns with async/await, enabling cleaner, more readable code without callback pyramids, as shown in the scanning and connection examples in the README.
Ensures safe concurrent access to Bluetooth operations across multiple threads, preventing race conditions in multi-threaded BLE apps.
Provides built-in functions to parse BLE characteristic data into common Swift types like String and Int, reducing manual conversion boilerplate for reads and writes.
Automatically sequences operations to prevent conflicts, simplifying complex BLE communication flows without manual synchronization.
Requires iOS 14.0+ and macOS 11.0+, excluding older devices and projects that need backward compatibility, limiting its use in legacy environments.
Abstracts away CoreBluetooth's delegate patterns, which can restrict access to fine-grained events or custom configurations that advanced BLE use cases might require.
Practical usage examples are in a separate cookbook repository, fragmenting documentation and making it harder for developers to find integrated guidance quickly.