PeripheralIdentifier
public struct PeripheralIdentifier : PeripheralIdentifiable
extension PeripheralIdentifier: CustomStringConvertible
extension PeripheralIdentifier: Equatable, Hashable
An object that contains the unique identifier of the CBPeripheral
and the name of it (if present)
-
The
UUID
of the peripheralDeclaration
Swift
public var id: UUID
-
The name of the peripheral
Declaration
Swift
public var name: String?
-
The wrapped
CBPeripheral
Declaration
Swift
public var cbPeripheral: CBPeripheral?
-
Initialize a
PeripheralIdentifier
using aCBPeripheral
Declaration
Swift
public init(peripheral: CBPeripheral)
-
Initialize a
PeripheralIdentifier
.Declaration
Swift
public init(uuid: UUID, name: String? = nil)
Parameters
uuid
the
UUID
of a peripheral.name
the name of a peripheral
Return Value
An instance of
PeripheralIdentifier
. -
Initialize a
PeripheralIdentifier
.Throws
and error is thrown if the converstion string->UUID failsDeclaration
Swift
public init(string: String, name: String? = nil) throws
Parameters
string
the uuid in string of a peripheral.
name
the name of a peripheral
Return Value
An instance of
PeripheralIdentifier
. -
Extended description
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public static func == (lhs: `Self`, rhs: `Self`) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)