When using the CoreBluetooth framework to access Bluetooth Low Energy devices, the CBCentralManager returns a CBPeripheral for the peripheral.
Multiple services are available on the peripheral and I would like to split the code that handles characteristic value updates for the different services into multiple classes. Therefore, I would need to attach multiple id<CBPeripheralDelegate> delegates to the peripheral. However, this is not possible because only one delegate is supported.
Is there a way to get multiple
CBPeripheralinstances for the same peripheral?If it is possible that multiple applications access the same peripheral, do they receive different
CBPeripheralinstances? If yes, do they see updates from the other application? (Say, application A writes a value to a characteristic, does application B's delegate also receive the [– peripheral:didWriteValueForCharacteristic:error:] message?)Are there any elegant approaches to support splitting the event handling code into multiple classes?