gpt4 book ai didi

iphone - iOS6 不会断开蓝牙智能/LE 外设

转载 作者:行者123 更新时间:2023-12-03 21:15:58 26 4
gpt4 key购买 nike

在升级到 iOS6 之前,一切正常,但现在当我运行时

[centralManager cancelPeripheralConnection:peripheral];

回调被触发

-(void) centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral     *)peripheral error:(NSError *)error{
NSLog(@"Disconnected");
NSLog(@"Error: %@", [error localizedDescription]);
}

和控制台输出

Disconnected
Error: (null)

不过,直到我在设置中关闭蓝牙或打开手机(我在外围设备上有连接状态)之前,外围设备不会断开连接。还有其他人发现这个 iOS6 特定问题吗?

最佳答案

我相信这是 iOS6 的一个功能(如果你愿意这么称呼的话)。

这只是一种不中断可能使用该连接的其他应用程序(或者可能处于配对过程中)的方法。断开连接最多可能需要 45 秒。

如果可能,最好的解决方案可能是触发与外围设备的断开连接,然后断开连接会立即发生。

http://lists.apple.com/archives/bluetooth-dev/2012/Sep/msg00090.html

关于iphone - iOS6 不会断开蓝牙智能/LE 外设,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13398095/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com