I try to connect to a peripheral that is found by my CBCentralMangager, but the didConnect never called in ios10
func centralManager(central: CBCentralManager, didDiscoverPeripheral peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber) {
let discoveredPeripheral = peripheral
print("found new CBPeripheral") //prints found new CBPeripheral both for ios9 and ios 10
centralManager.connectPeripheral(discoveredPeripheral, options: nil)
}
func centralManager(central: CBCentralManager, didConnectPeripheral peripheral: CBPeripheral) {
print("did connect") //not printing in ios 10 running on my iphone 5, prints on iPad running ios 9
peripheral.delegate = self
peripheral.discoverServices([AppCBUUID])
}
I use the exact the same code for testing the central side on iPad(running ios9) and iPhone5(running ios10), but gots different results. I wonder whether this is bug in core bluetooth in ios10