I have a problem with the lifecycle of Bluetooth on iOS.
We are using React Native and the following library (https://github.com/innoveit/react-native-ble-manager) to manage our Bluetooth devices.
当设备通过蓝牙发送其所有数据时,设备发送数据并清除其本地数据(我们仅使用ble消息确认,没有内部应用程序确认).
问题是,当应用程序被关闭时,iOS似乎保持ble打开,这使设备认为它仍在发送由我们的应用程序正确处理的数据,并在最后清除它(这会导致数据丢失).
这是iOS上的正常行为吗?(事实上,ble在应用程序被终止后保持打开一段时间,并且没有通过ble发送错误?)
有没有办法在应用程序被关闭时强制关闭ble?
谢谢