When I scan for 2 peripherals each having a single service and characteristic (with cServiceArray being an NSArray of both service CBUUIDs) with the method:
[self.centralManager scanForPeripheralsWithServices:cServiceArray options:@{CBCentralManagerScanOptionAllowDuplicatesKey : @NO }];
I receive the following console response::
2013-10-18 13:58:37.069 BlueMarco[1137:60b] didDiscoverPeripheral peripheral description <CBPeripheral: 0x14e799d0 identifier = 33C98AC7-E25E-0803-82D2-326FC8C0FDB1, Name = "ICServer_2", state = disconnected>
. . .
2013-10-18 13:58:37.072 BlueMarco[1137:60b] didDiscoverPeripheral Connecting to peripheral ICServer_2
. . .
2013-10-18 13:58:37.076 BlueMarco[1137:60b] didDiscoverPeripheral peripheral description <CBPeripheral: 0x14e75b60 identifier = E634E343-0DCF-3A4F-1F88-D4C87EA731EA, Name = "ICServer_1", state = disconnected>
. . .
2013-10-18 13:58:37.079 BlueMarco[1137:60b] CoreBluetooth[WARNING] <CBPeripheral: 0x14e799d0 identifier = 33C98AC7-E25E-0803-82D2-326FC8C0FDB1, Name = "ICServer_2", state = connecting> is being dealloc'ed while connecting
2013-10-18 13:58:37.080 BlueMarco[1137:60b] didDiscoverPeripheral Connecting to peripheral ICServer_1
2013-10-18 13:58:37.093 BlueMarco[1137:60b] didConnectPeripheral peripheral <CBPeripheral: 0x14e75b60 identifier = E634E343-0DCF-3A4F-1F88-D4C87EA731EA, Name = "ICServer_1", state = connected>
This shows the connection to one peripheral broken as I make a connection to the second server. Is this the expected behavior? If so, why does the method scanForPeripheralsWithServices allow an NSArray of service CBUUIDs as an argument? If not, can anyone show me how to scan for and handle the reception of multiple services?
Richard Lipes