Swiftpack.co - Package - PureSwift/Bluetooth

Bluetooth

Swift Platform Release License

Build Status CodeBeat Docs

SPM compatible Carthage compatible

Pure Swift Bluetooth Definitions.

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

Swift Package Manager

import PackageDescription

let package = Package(
    name: "hcitool",
    products: [
        .executable(name: "hcitool", targets: ["hcitool"])
    ],
    dependencies: [
        .package(url: "https://github.com/PureSwift/Bluetooth.git", .branch("master"))
    ],
    targets: [
        .target(
            name: "hcitool",
            dependencies: [
                "Bluetooth"
            ]
        )
    ]
)

Carthage

github "PureSwift/Bluetooth"

Documentation

Read the documentation here. Documentation can be generated with Jazzy. For more information, see the gh-pages branch.

See Also

  • BluetoothLinux - Pure Swift Linux Bluetooth Stack
  • BluetoothDarwin - Low Level Swift Bluetooth library for the Darwin kernel
  • AndroidBluetooth - Swift Bluetooth stack for Android
  • GATT - Bluetooth Generic Attribute Profile (GATT) for Swift
  • Netlink - Swift library for communicating with Linux Kernel Netlink subsystem (Linux Only)
  • DBus - Swift library for DBus (Linux Only)
  • Cacao - Pure Swift Cross-platform UIKit
  • Silica - Pure Swift CoreGraphics (Quartz2D) implementation
  • Predicate - Pure Swift Predicate implementation
  • TLVCoding - Swift TLV8 (Type-Length-Value) Encoding library

License

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

Github

link
Stars: 21
Help us keep the lights on

Dependencies

Releases

3.3.0 - Nov 28, 2018

  • #117 Improved GAPData data encoding
  • #111 Use synthesized Equatable and Hashable
  • aaf53f7 GATT.UUID should be internal

3.2.1 - Nov 23, 2018

  • #117 Refactored data encoding
  • d9eb40e Added ATTProtocolDataUnit.validateOpcode()
  • 6990cfa Added Data.suffixCheckingBounds(from:)
  • 26b729c Updated MTU truncation for GATT Notifications and Indications

3.2.0 - Nov 22, 2018

  • #117 Refactored data encoding
  • b94aa10 Removed BluetoothAddress.any
  • 1ca8508 Removed usage of Range
  • ed6a929 Added ATTAttributeDataList
  • 66e52a4 Updated GATTCharacteristicFormatType

3.1.0 - Nov 19, 2018

  • #115 Updated for Swift 4.2
  • #113 Implemented CaseIterable

3.0.0 - Nov 18, 2018

  • #111 Updated for Swift 4.1, deprecated Swift 3 support
  • 1af36d05ce3049b19510d67d84425b1e3ba66156 Updated POSIXError
  • d836f38 Fixed GATTServer.maximumTransmissionUnit
  • ae2d6fb Renamed Address to BluetoothAddress
  • 26c7f7a7 ATTConnection is now internal instead of public