Protocols

The following protocols are available globally.

  • ServiceIdentifier protocol specifies how information about services of device should look like. Sample implementation could look like:

    enum DeviceService: String, ServiceIdentifier {
        case deviceInformation = "180A"
        var uuid: CBUUID {
            return CBUUID(string: self.rawValue)
        }
    }
    

    After implementing this and other protocol `CharacteristicIdentifier, you could call methods even easier thanks to convenience methods in library. This methods do all of the heavy lifting like discovering services, taking them from cache etc. for you. We really recommend you to use it.

    See more

    Declaration

    Swift

    public protocol ServiceIdentifier
  • Characteristic protocol specifies how information about characteristics of device should look like. Sample implementation could look like:

    enum DeviceCharacteristic: String, CharacteristicIdentifier {
        case manufacturerName = "2A29"
        var uuid: CBUUID {
            return CBUUID(string: self.rawValue)
        }
        var service: ServiceIdentifier {
            switch self {
            case .ManufacturerName:
                return XXXService.DeviceInformation
            }
        }
    }
    
    See more

    Declaration

    Swift

    public protocol CharacteristicIdentifier
  • DescriptorIdentifier protocol specifies how information about descriptors of device should look like.

    See more

    Declaration

    Swift

    public protocol DescriptorIdentifier
  • Simple logging interface.

    An application that wants RxBluetoothKit to use its logging solution will need to provide a type that conforms to this signature and assign it to RxBluetoothKitLogger.defaultLogger.

    See more

    Declaration

    Swift

    public protocol Logger
  • Undocumented

    See more

    Declaration

    Swift

    public protocol ManagerType : AnyObject