I'm trying to create a BLE pairing user-experience screen in my app. The app scans for our BLE device, and when discovered, automatically connect it to the centralManager. The System then shows a Bluetooth Pairing Request dialog (not part of my app, but iOS's). The user has two options - Pair/Cancel. Thing is - Even when the Cancel action is being selected by the user - The peripheral still stays connected to the centralManager. (the centralManagerDidConnect function is being trigger) Even though it's not paired with the phone. Is there any way that I can know if the user chose to pair the device, or to cancel the pairing ??? Thanks!
Make sure Bluetooth is turned on. Touch and hold Bluetooth . In the list of paired devices, tap a paired but unconnected device. When your phone and the Bluetooth device are connected, the device shows as "Connected."
Find my detailed answer to a similar question here.
You should basically write to a characteristic of the device after pairing and check if the write was successful
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With