Reputation: 753
Have two questions in BLE.
How to get all the paired BLE peripherals from the device and how to know whether my discoveredPeripheral is already paired or not?
If the discoveredPeripheral is already paired, How to remove the pairing i.e to delete the pairing from the device?
Thanks.
Upvotes: 1
Views: 670
Reputation: 554
1: You can use:
retrievePeripheralsWithIdentifiers
But you will need to know the peripheral UUID,
or you can retrieve connected peripherals which has the provided services:
retrieveConnectedPeripheralsWithServices
But there isn't any good ways of detecting whether or not a peripheral is bonded or not.
2: You can not remove the pairing using code. The user will have to do this manually through the iOS system settings. (Settings -> Bluetooth -> Peripheral -> Forget device)
Upvotes: 1