I'm working on the app that will connect with a smart device via BLE and communicate with it.
The question is: In what queue is the best practice to handle bluetooth events?
I've read a lot of tutorials and in all of them I found this:
centralManager = CBCentralManager(delegate: self, queue: nil)
They choose to handle bluetooth events in main queue (queue: nil
), but I suppose that it's not good practice. Because it could be a lot of queries send to peripheral device from central and a lot of answers send from peripheral to central.
I assume this might be the reason of the app working slowly and might detrimentally affect the productivity, am I right?
Will this flood the UI update queue?