最近一段在做低功耗蓝牙的项目, 有个需求是需要在后台长期运行蓝牙的连接 重连 数据传输等操作,但是苹果对后台运行的程序比较严格,网上现有的很多方案都不合适,后面在苹果文档上找到了答案,完美解决!
就不贴代码了,下面是摘要,看完就懂了:
Performing Long-Term Actions in the Background
Some apps may need to use the Core Bluetooth framework to perform long-term actions in the background. As an example, imagine you are developing a home security app for an iOS device that communicates with a door lock (equipped with Bluetooth low energy technology). The app and t