I'm trying to programmatically retrieve a list of paired bluetooth peripherals, the following is my code to do so, the code fires correctly, however it always comes back with an empty list.
[self.centralManager retrieveConnectedPeripherals];
- (void)centralManager:(CBCentralManager *)central didRetrieveConnectedPeripherals:(NSArray *)peripherals
{
// peripherals is always empty here
}
Is this the correct way to retrieve the list of paired peripherals?
also according to the iOS developer library, the above method is deprecated, and I should be using retrieveConnectedPeripheralsWithServices
instead.
the method has a parameter serviceUUIDs
what is this, and how do I find out what to use?
Thanks.