Bluetooth LE Device scan in background from iOS

一世执手 提交于 2019-11-30 19:19:15

You cannot scan for nil services in the background - you must specify the service(s) that you are interested in. From the documentation

Apps that have specified the bluetooth-central background mode are allowed to scan while in the background. That said, they must explicitly scan for one or more services by specifying them in the serviceUUIDs parameter.

For your app to continue to receive Bluetooth updates in the background, you need to add a UIBackgroundModes entry to your Info.plist and include the value bluetooth-central in the list.

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