Peripheral

public class Peripheral
extension Peripheral: Equatable

Peripheral is a class implementing ReactiveX API which wraps all Core Bluetooth functions allowing to talk to peripheral like discovering characteristics, services and all of the read/write calls.

  • Intance of CentralManager which is used to the bluetooth communication

    Declaration

    Swift

    public unowned let manager: CentralManager
  • Implementation of peripheral

    Declaration

    Swift

    public let peripheral: CBPeripheral
  • Attaches RxBluetoothKit delegate to CBPeripheral. This method is useful in cases when delegate of CBPeripheral was reassigned outside of RxBluetoothKit library (e.g. CBPeripheral was used in some other library or used in non-reactive way)

    Declaration

    Swift

    public func attach()
  • Value indicating if peripheral is currently in connected state.

    Declaration

    Swift

    public var isConnected: Bool { get }
  • Current state of Peripheral instance described by CBPeripheralState.

    Declaration

    Swift

    public var state: CBPeripheralState { get }

    Return Value

    Current state of Peripheral as CBPeripheralState.

  • Current name of Peripheral instance. Analogous to name of CBPeripheral.

    Declaration

    Swift

    public var name: String? { get }
  • Unique identifier of Peripheral instance. Assigned once peripheral is discovered by the system.

    Declaration

    Swift

    public var identifier: UUID { get }
  • A list of services that have been discovered. Analogous to services of CBPeripheral.

    Declaration

    Swift

    public var services: [Service]? { get }
  • YES if the remote device has space to send a write without response. If this value is NO, the value will be set to YES after the current writes have been flushed, and peripheralIsReadyToSendWriteWithoutResponse: will be called.

    Declaration

    Swift

    public var canSendWriteWithoutResponse: Bool { get }

Connecting

Services

Characteristics

Descriptors

Other methods