iOS - 蓝牙后台运行问题

2017-10-17  本文已影响32人  欧币杰昔

App在连接蓝牙设备使用时,手机可能会息屏或者手动锁屏了,App进入后台模式,如果没有进行相应处理,App就不会继续和蓝牙通讯。
想要是App进入后台也能和蓝牙设备正常通讯,需要在info.plist中添加相应关键字:

如图:在 Required background modes中添加两个item,App communicates using CoreBluetooth 和 App shares data using CoreBluetooth

ios蓝牙后台执行-infoplist.png
上一篇 下一篇

猜你喜欢

热点阅读