One Logo Pool Ball
CoreBluetooth · IOS API REFERENCE

CBPeripheral

class · iOS 5.0+ · SDK 27.1

class CBPeripheral

Members (22)

method · iOS 27.0+

cancelChannelSoundingSession

TypeScript
cancelChannelSoundingSession(): void
Swift declaration
func cancelChannelSoundingSession()
method · iOS 5.0+

discoverCharacteristics

TypeScript
discoverCharacteristics(characteristicUUIDs: (Array<CBUUID>) | null, service: CBService): void
Swift declaration
func discoverCharacteristics(_ characteristicUUIDs: [CBUUID]?, for service: CBService)
method · iOS 5.0+

discoverDescriptors

TypeScript
discoverDescriptors(characteristic: CBCharacteristic): void
Swift declaration
func discoverDescriptors(for characteristic: CBCharacteristic)
method · iOS 5.0+

discoverIncludedServices

TypeScript
discoverIncludedServices(includedServiceUUIDs: (Array<CBUUID>) | null, service: CBService): void
Swift declaration
func discoverIncludedServices(_ includedServiceUUIDs: [CBUUID]?, for service: CBService)
method · iOS 5.0+

discoverServices

TypeScript
discoverServices(serviceUUIDs?: (Array<CBUUID>) | null): void
Swift declaration
func discoverServices(_ serviceUUIDs: [CBUUID]?)
method · iOS 9.0+

maximumWriteValueLength

TypeScript
maximumWriteValueLength(type: CBCharacteristicWriteType): number
Swift declaration
func maximumWriteValueLength(for type: CBCharacteristicWriteType) -> Int
method · iOS 11.0+

openL2CAPChannel

TypeScript
openL2CAPChannel(PSM: number): void
Swift declaration
func openL2CAPChannel(_ PSM: CBL2CAPPSM)
method · iOS 5.0+

readRSSI

TypeScript
readRSSI(): void
Swift declaration
func readRSSI()
method · iOS 5.0+

readValue

TypeScript
readValueFor(characteristic: CBCharacteristic): void
Swift declaration
func readValue(for characteristic: CBCharacteristic)
method · iOS 5.0+

readValue

TypeScript
readValueFor17880(descriptor: CBDescriptor): void
Swift declaration
func readValue(for descriptor: CBDescriptor)
method · iOS 5.0+

setNotifyValue

TypeScript
setNotifyValue(enabled: boolean, characteristic: CBCharacteristic): void
Swift declaration
func setNotifyValue(_ enabled: Bool, for characteristic: CBCharacteristic)
method · iOS 27.0+

startChannelSoundingSession

TypeScript
startChannelSoundingSession(configuration: CBChannelSoundingSessionConfiguration): void
Swift declaration
func startChannelSoundingSession(_ configuration: CBChannelSoundingSessionConfiguration)
method · iOS 5.0+

writeValue

TypeScript
writeValueForType(data: ArrayBuffer, characteristic: CBCharacteristic, type: CBCharacteristicWriteType): void
Swift declaration
func writeValue(_ data: Data, for characteristic: CBCharacteristic, type: CBCharacteristicWriteType)
method · iOS 5.0+

writeValue

TypeScript
writeValueFor(data: ArrayBuffer, descriptor: CBDescriptor): void
Swift declaration
func writeValue(_ data: Data, for descriptor: CBDescriptor)
get · iOS 5.0+ · Deprecated in iOS 8.0

rssi

TypeScript
get rssi(): (_Foundation_NSNumber) | null
Swift declaration
var rssi: NSNumber? { get }
get · iOS 13.0+

ancsAuthorized

TypeScript
get ancsAuthorized(): boolean
Swift declaration
var ancsAuthorized: Bool { get }
get · iOS 11.0+

canSendWriteWithoutResponse

TypeScript
get canSendWriteWithoutResponse(): boolean
Swift declaration
var canSendWriteWithoutResponse: Bool { get }
get · iOS 5.0+

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
weak var delegate: (any CBPeripheralDelegate)? { get set }
set · iOS 5.0+

delegate

TypeScript
set delegate(value: (Implements<CBPeripheralDelegate> | SDKHandle) | null)
Swift declaration
weak var delegate: (any CBPeripheralDelegate)? { get set }
get · iOS 5.0+

name

TypeScript
get name(): (string) | null
Swift declaration
var name: String? { get }
get · iOS 5.0+

services

TypeScript
get services(): (Array<CBService>) | null
Swift declaration
var services: [CBService]? { get }
get · iOS 5.0+

state

TypeScript
get state(): CBPeripheralState
Swift declaration
var state: CBPeripheralState { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CBPeripheral.init()

inherited init: clang: 'init' is unavailable

All CoreBluetooth types →