Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove paired Bluetooth devices on iOS?

I want my app could remove paired bluetooth devices. Becaues if device paried with iPhone, the device couldn't used for another device. I tried CBCentralManager cancelPeripheralConnection, but it doesn't work. they're still paired.

Or there's some other app still connected this server?

iPhone5,iOS7

like image 871
studentdeng Avatar asked Dec 20 '22 16:12

studentdeng


1 Answers

You cannot unpair a device programmatically in iOS.

The cancelPeripheralConnection is only to disconnect your apps connection to the device.

Discussion

This method is nonblocking, and any CBPeripheral class commands that are still pending to peripheral may or may not complete. Because other apps may still have a connection to the peripheral, canceling a local connection does not guarantee that the underlying physical link is immediately disconnected. From the app’s perspective, however, the peripheral is considered disconnected, and the central manager object calls the centralManager:didDisconnectPeripheral:error: method of its delegate object.

like image 129
rckoenes Avatar answered Dec 22 '22 07:12

rckoenes