简体   繁体   English

GKSession将获取后台处于后台的其他设备的对等ID

[英]GKSession will get peer ids of other devices which are in background

Will GKPeerPickerController show the peer ids of the bluetooth device which is part of one particular application in suspended mode GKPeerPickerController将显示处于挂起模式的一个特定应用程序一部分的蓝牙设备的对等ID。

Scenario 情境

I have an iOS bluetooth application XYZ with a particular session id.Same application is running in multiple devices with same session id. 我有一个具有特定会话ID的iOS蓝牙应用程序XYZ,同一应用程序正在多个具有相同会话ID的设备中运行。 Each devices should show the list of nearby devices in the XYZ application. 每个设备应在XYZ应用程序中显示附近设备的列表。 Suppose the application has gone suspended mode in one of the device. 假设应用程序已在其中一个设备中进入了挂起模式。 My question is still the other peers will get the peer ID of the bluetooth device which from the XYZ app which is in suspended mode. 我的问题是,其他对等方仍将从处于挂起模式的XYZ应用程序中获取蓝牙设备的对等方ID。

Thanks in advance 提前致谢

No: GKSession operates on threads in your app's process, where all threads are suspended when your app is in background mode. 否:GKSession在应用程序进程中的线程上运行,当您的应用程序处于后台模式时,所有线程都将挂起。 This means that GKSession will not respond to any of the Bonjour requests or network event callbacks while your process is backgrounded, because no threads in your app will get time on the CPU. 这意味着当您的进程进入后台时,GKSession将不会响应任何Bonjour请求或网络事件回调,因为您的应用程序中没有线程会占用CPU时间。

GKSession will however work when your app is in 'inactive' mode (which happens when the user pushes the lock button on the top of the phone, or is looking at the phone call screen or the notification drawer). 但是,当您的应用程序处于“非活动”模式(用户按下电话顶部的锁定按钮或查看电话屏幕或通知抽屉)时,GKSession将起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM