Array
extension Array where Element == ITCB_Device_Peripheral_Protocol
extension Array where Element == CBService
extension Array where Element == CBCharacteristic
This extension implements a method like contains(_:), to compare the UUIDs of Peripherals.
-
This searches the Array for instances of a given device, comparing UUIDs
Declaration
Swift
func contains(_ inCBPeripheral: CBPeripheral) -> Bool
Parameters
inCBPeripheral
The device that we are comparing, but as a CBPeripheral.
Return Value
True, if the Array contains the device.
-
Special String subscript that allows us to retrieve a Service, by its CBUUID
Declaration
Swift
public subscript(inUUIDString: String) -> Element! { get }
Parameters
inUUIDString
The String for the UUID we’re looking to match.
Return Value
The found Service, or nil, if not found.
-
Special String subscript that allows us to retrieve a Characteristic, by its CBUUID
Declaration
Swift
public subscript(inUUIDString: String) -> Element! { get }
Parameters
inUUIDString
The String for the UUID we’re looking to match.
Return Value
The found Characteristic, or nil, if not found.