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?
I placed CBCentralManager
to a singleton and the error message is solved.
(CBCentralManager
will not be deallocated)
I was getting the following message:
[CoreBlueooth] XPC Connection Invalid
And I wasn't able to scan BLE devices using a quite simple implementation of the following:
NSObject<CBCentralManagerDelegate, CBPeripheralDelegate>
The solution for me was to add a value in my Info.plist
for Privacy - Bluetooth Peripheral Usage Description NSBluetoothPeripheralUsageDescription
describing what I do with Bluetooth Peripheral.
Looks like this in info.plist
:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Play with BLE Compatible devices<string>
Write something more accurate in here ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With