pureswift/bluetooth

Swift Bluetooth library

235

stars

2,393

commits

Swift

primary language

Aug 7, 2026

updated

pureswift.github.io/Bluetooth/
bluetooth
bluetooth-low-energy
embedded
gatt
l2cap
swift

README

Bluetooth

Swift Platform Release License

Bluetooth is a Swift package with multiple libraries supporting the Bluetooth SIG specifications and protocols, including GAP, GATT, HCI, L2CAP, Classic (BR/EDR) and Low Energy support.

Usage

import Bluetooth

let uuid128bit = BluetoothUUID(rawValue: "60F14FE2-F972-11E5-B84F-23E070D5A8C7")
let uuid16bit = BluetoothUUID(rawValue: "FEA9")
let address = BluetoothAddress(rawValue: "00:1A:7D:DA:71:13")

Installation

Bluetooth is available as a Swift Package Manager package. To use it, add the following dependency in your Package.swift:

.package(url: "https://github.com/PureSwift/Bluetooth.git", branch: "master"),

and to your target, add Bluetooth to your dependencies. You can then import Bluetooth to get access to Bluetooth functionality.

Platforms

Support for different operating systems and platforms is spread across a suite of Swift packages supporting each which all depend on this package as a foundation. It currently supports WebAssembly (Chrome, Edge), Android, Embedded Swift, desktop Linux (Debian, Fedora, Arch), Buildroot and Yocto Linux.

PlatformRolesBackendLibrary
macOS, iOS, watchOS, tvOS, visionOSCentral, PeripheralCoreBluetoothDarwinGATT
LinuxCentral, PeripheralBlueZBluetoothLinux, GATT
AndroidCentralJava Native InterfaceAndroidBluetooth
WebAssemblyCentralBluetooth Web APIBluetoothWeb
Pi Pico WPeripheralBlueKitchen BTStackBTStack
ESP32PeripheralApache NimBLENimBLE
nRF52840PeripheralZephyr SDKZephyr

Documentation

Read the documentation here. Documentation can be generated with DocC.

License

Bluetooth is released under the MIT license. See LICENSE for details.

Contributors

colemancda

1,929 commits

carlos21

320 commits

jmarkstar

92 commits

JurjDev

37 commits

pureswift/bluetooth

Swift Bluetooth library

235

stars

2,393

commits

Swift

primary language

Aug 7, 2026

updated

pureswift.github.io/Bluetooth/
bluetooth
bluetooth-low-energy
embedded
gatt
l2cap
swift

README

Bluetooth

Swift Platform Release License

Bluetooth is a Swift package with multiple libraries supporting the Bluetooth SIG specifications and protocols, including GAP, GATT, HCI, L2CAP, Classic (BR/EDR) and Low Energy support.

Usage

import Bluetooth

let uuid128bit = BluetoothUUID(rawValue: "60F14FE2-F972-11E5-B84F-23E070D5A8C7")
let uuid16bit = BluetoothUUID(rawValue: "FEA9")
let address = BluetoothAddress(rawValue: "00:1A:7D:DA:71:13")

Installation

Bluetooth is available as a Swift Package Manager package. To use it, add the following dependency in your Package.swift:

.package(url: "https://github.com/PureSwift/Bluetooth.git", branch: "master"),

and to your target, add Bluetooth to your dependencies. You can then import Bluetooth to get access to Bluetooth functionality.

Platforms

Support for different operating systems and platforms is spread across a suite of Swift packages supporting each which all depend on this package as a foundation. It currently supports WebAssembly (Chrome, Edge), Android, Embedded Swift, desktop Linux (Debian, Fedora, Arch), Buildroot and Yocto Linux.

PlatformRolesBackendLibrary
macOS, iOS, watchOS, tvOS, visionOSCentral, PeripheralCoreBluetoothDarwinGATT
LinuxCentral, PeripheralBlueZBluetoothLinux, GATT
AndroidCentralJava Native InterfaceAndroidBluetooth
WebAssemblyCentralBluetooth Web APIBluetoothWeb
Pi Pico WPeripheralBlueKitchen BTStackBTStack
ESP32PeripheralApache NimBLENimBLE
nRF52840PeripheralZephyr SDKZephyr

Documentation

Read the documentation here. Documentation can be generated with DocC.

License

Bluetooth is released under the MIT license. See LICENSE for details.

Contributors

colemancda

1,929 commits

carlos21

320 commits

jmarkstar

92 commits

JurjDev

37 commits

Languages

Swift

93.7%

C

5.1%