0

在通过蓝牙相互发送数据的 iPhone 之间相当普遍地发生奇怪的崩溃。经过大量的努力,我仍然无法在调试器中重现它。

崩溃日志:

NSInternalInconsistencyException
Invalid parameter not satisfying: request != nil

3 Foundation 0x0000000186d28ed4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 108
4 CoreBluetooth 0x0000000185aec808 -[CBPeripheralManager respondToRequest:withResult:] + 156
5 CoreBluetooth 0x0000000185aee410 -[CBPeripheralManager handleSetAttributeValues:] + 1104

不知道是什么触发了外设管理器调用 handleSetAttributeValues 或 nil 值从这里来。

在代码库中只有一个地方我调用 [CBPeripheralManager respondToRequest:withResult:] 并且我在它周围有保护措施,以确保如果请求为零,它永远不会被调用。

4

0 回答 0