CoreBluetooth XPC Connection Invalid on dismiss viewcontroller

core-bluetooth, ios, objective-c

Solution

I placed `CBCentralManager` to a singleton and the error message is solved.

(`CBCentralManager` will not be deallocated)

Problem

After I have finished disconnecting from my bluetooth devices, seeing that they have disconnected in the didDisconnectPeripheral delegate, I attempt to dismiss my viewcontroller. When this happens I see the message: "[CoreBlueooth] XPC Connection Invalid" Is there something in specific that has to be cleaned up with Bluetooth before the viewcontroller is dismissed?

Original source