I am working on an application that will connect to a smart device via BLE and communicate with it.
Question: In which queue is it best to deal with bluetooth events?
I read a lot of tutorials and in all of them I found this:
centralManager = CBCentralManager(delegate: self, queue: nil)
They prefer to handle bluetooth events in the main queue ( queue: nil), but I believe this is not a good practice. Because it can be many requests sent to the peripheral device from the center, and many responses are sent from the peripheral to the central one.
I assume that this may be the reason that the application is slow and can negatively affect performance, am I right?
Will this flood the UI update queue?
source
share