Does startAdvertisingPeer work when app enters background?

♀尐吖头ヾ 提交于 2019-11-27 02:59:44

问题


I'd like the app to advertise a service even when the app enters the background. With Core Bluetooth, this is possible by setting bluetooth-peripheral for UIBackgroundModes.

Does anyone know if the same can be achieved with MCNearbyServiceAdvertiser? Thanks.


回答1:


When I was at WWDC this year I went to a Developer Lab for Multipeer Connectivity and was told by an Apple engineer that no, service advertisers and browsers will not work in the background.

That said, I've been successfully communicating with connected peers with an app running in the background using a background task, but I have not been able to advertise or browse.



来源:https://stackoverflow.com/questions/20480600/does-startadvertisingpeer-work-when-app-enters-background

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