开源软件名称(OpenSource Name):PureSwift/BluetoothLinux开源软件地址(OpenSource Url):https://github.com/PureSwift/BluetoothLinux开源编程语言(OpenSource Language):Swift 96.6%开源软件介绍(OpenSource Introduction):Pure Swift Bluetooth Stack for Linux Does not require BlueZ userland library, communicates directly with the Linux kernel Bluetooth subsystem. Usageimport Bluetooth
import BluetoothLinux
guard let hostController = await BluetoothLinux.HostController.default
else { fatalError("No Bluetooth adapters found") }
let uuid = UUID(rawValue: "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0")!
let beacon = AppleBeacon(uuid: uuid, major: 1, minor: 1, rssi: -29)
do { try await hostController.iBeacon(beacon) }
catch { print("Error enabling iBeacon: \(error)") } InstallationSwift Package Managerimport PackageDescription
let package = Package(
dependencies: [
.package(
url: "https://github.com/PureSwift/BluetoothLinux.git",
.branch("master")
)
]
) DocumentationRead the documentation here. Documentation can be generated with DocC. See Also
LicenseBluetoothLinux is released under the MIT license. See LICENSE for details. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论