如何在iOS上删除配对的蓝牙设备? [英] How do I remove paired Bluetooth devices on iOS?

查看:1403
本文介绍了如何在iOS上删除配对的蓝牙设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的应用程序可以删除配对的蓝牙设备.因为如果设备挂断了iPhone,则该设备无法用于其他设备. 我尝试了CBCentralManager cancelPeripheralConnection,但是它不起作用.他们仍然配对.

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

iPhone5,iOS7

推荐答案

您无法在iOS中以编程方式取消配对设备.

You cannot unpair a device programmatically in iOS.

cancelPeripheralConnection仅用于断开您的应用程序与设备的连接.

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

讨论

此方法是非阻塞的,并且任何CBPeripheral类命令都可以 尚待处理的外围设备可能会或可能不会完成.因为其他 应用可能仍然与外围设备建立了连接,从而取消了本地 连接不能保证基础物理链接是 立即断开连接.从应用程序的角度来看, 外设被视为已断开连接,并且中央管理器对象 调用centralManager:didDisconnectPeripheral:error:其方法 委托对象.

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.

这篇关于如何在iOS上删除配对的蓝牙设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆