iosswiftbluetooth-lowenergycore-bluetoothcbperipheral

How can a CBPeripheralManager know when it is connected to a central device?


I am following Apple's documentation on developing a peripheral side app and I cannot find a way to figure out when a central device connects. Is there a way to find this out somehow?

Thanks!


Solution

  • If the central just connects and retrieves your services and characteristics then there is no indication on the peripheral side that it has connected.

    You only receive read, write and subscription requests via the relevant CBPeripheralManagerDelegate methods. This means that you only become aware of the central when it performs one of these actions