多人连接有时不发送邀请

Multipeer connectivity sometimes doesn't send invitations

我们中的一些人知道框架 multipeer conectivity 是一个有问题的框架,它有一些错误。在我的情况下并没有什么不同,我意识到有时当我尝试连接其他设备时我 运行 遇到以下问题

1) I see the same duplicate devices more than 2 times.

2) Sometimes when I send an invitation to connect with another device, the call does not reach it! (but most often arrives)

我相信这不是我的代码的问题,因为谁负责打开视图以显示我们连接的设备列表是 MCBrowserViewController

就我而言,我正在测试 iphone4s 和我的 模拟器 (iphone4s) 之间的信息交换,我不知道如果这可能是问题所在,你们怎么看?

当你对一个错误感到绝望时,你应该取消模拟器,因为它增加了复杂性。但是我使用它取得了合理的成功。在测试了我的 MPC 应用程序的不同版本数小时后,重启设备(模拟器的主机和真实设备)有时会帮助解决奇怪的 MPC 行为。最后,一定要按照文档中的说明处理主队列上的 MPC 数据。除非你 post 示例代码,否则你只会得到意见。