IOS CoreBluetooth : App Running in Background When BLE is Disconnected

不打扰是莪最后的温柔 提交于 2019-12-04 15:32:55

If you register your app using bluetooth-central Background Execution Mode, your app will be fired up if it's not running, and will get it's delegate methods called for handling discovery and connections, such as centralManager:didDiscoverPeripheral, from which you can call connectPeripheral:options:.

It's true that the system may kill your app in the background, but it will relaunch it for these events.

The only time that the system won't relaunch your app for background BLE execution is if the user force killed the app on the previous launch. The system will remember this and won't relaunch the app again until the user manually relaunches it the first time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!