问题
I'm making BLE connection between iPhone and device with CBPeripheralManager.
If Central tried to pair with peripheral, Bluetooth pairing alertController pops up and user can choice which one there're going to use. Most of them will push a connect button.
But is there a way to know when user push a cancel button?
Delegate API would be good but I couldn't find it.
回答1:
I'm not sure, but maybe didFailToConnectPeripheral method of CBCentralManagerDelegate is a good place to handle your case.
来源:https://stackoverflow.com/questions/34131132/in-cbperipheralmanager-how-to-know-if-user-push-a-cancel-button-when-its-tryin