后台模式下的多点连接

Multipeer Connectivity in background mode

我实现了一个 iOS 应用程序,它使用 MPC 将数据发送到 OS X 应用程序。 MPC 会话建立后,数据传输没有问题。但是,当 iOS 应用程序进入后台模式时,一段时间后会话似乎断开连接。

请注意以下事实:

  1. iOS 应用设置为在后台运行,因为它也执行一些 BLE 任务,所以我确信 iOS 应用 运行 即使在在后台模式下(我确保它不会在任何时候进入暂停模式)。
  2. 我知道 Apple 文档指出,一旦应用程序进入后台模式,MPC 就会关闭。

If the app moves into the background, the framework stops advertising and browsing and disconnects any open sessions. Upon returning to the foreground, the framework automatically resumes advertising and browsing, but the developer must reestablish any closed sessions.

我的问题是,是否有任何解决方法可以让我的 MPC 即使在应用程序处于后台模式时也保持活动状态?

更新: 我找不到解决方法。我最终使用了纯 BLE。

不,不幸的是,没有解决方法可以在应用程序处于后台模式时保持 MPC 会话处于活动状态。