Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork28
PureSwift/Bluetooth
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
import Bluetoothletuuid128bit=BluetoothUUID(rawValue:"60F14FE2-F972-11E5-B84F-23E070D5A8C7")letuuid16bit=BluetoothUUID(rawValue:"FEA9")letaddress=BluetoothAddress(rawValue:"00:1A:7D:DA:71:13")
Bluetooth is available as a Swift Package Manager package. To use it, add the following dependency in yourPackage.swift
:
.package(url:"https://github.com/PureSwift/Bluetooth.git", branch:"master"),
and to your target, addBluetooth
to your dependencies. You can thenimport Bluetooth
to get access to Bluetooth functionality.
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.
Platform | Roles | Backend | Library |
---|---|---|---|
macOS, iOS, watchOS, tvOS, visionOS | Central, Peripheral | CoreBluetooth | DarwinGATT |
Linux | Central, Peripheral | BlueZ | BluetoothLinux,GATT |
Android | Central | Java Native Interface | AndroidBluetooth |
WebAssembly | Central | Bluetooth Web API | BluetoothWeb |
Pi Pico W | Peripheral | BlueKitchen BTStack | BTStack |
ESP32 | Peripheral | Apache NimBLE | NimBLE |
nRF52840 | Peripheral | Zephyr SDK | Zephyr |
Read the documentationhere.Documentation can be generated withDocC.
Bluetooth is released under the MIT license. See LICENSE for details.
About
Swift Bluetooth library
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.