In CBPeripheralManager, how to know if user push a cancel button when it's trying to pairing

雨燕双飞 提交于 2019-12-11 11:56:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!