Currently my team is calling
[myCentralManager scanForPeripheralsWithServices:nil options:nil];
and then starting an NSTimer
that fires in two seconds. During these two seconds, the Central Manager delegate method
centralManager:didDiscoverPeripheral:advertisementData:RSSI:
is used to create an array of CBPeripherals
that we are interested in.
When the timer fires, we call connectPeripheral
on every item in the array within a for loop.
I am worried that this is not the best way to connect to several devices at once. Should we wait for one device's connection process to complete before calling connectPeripheral
on another device?
Thanks for any suggestions.
Have you experienced issues? If not, then do it the way you do.
Some additional thoughts:
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