Multipeer Connectivity connection is flaky on iOS 26

While updating our test devices to iOS 26, we noticed that the connection between devices are flaky. Often when connecting to a Peer from a device running iOS 26 we can observe the invite coming through and when accepting said invite, both ends going to .connecting state and a while later going back to .notConnected within the peer(_ peerID: MCPeerID, didChange state: MCSessionState) function. This happens regularly and retrying the invitation process several times usually resolves it. Do anyone have any information or guidance on how to resolve this issue?

While updating our test devices to iOS 26, we noticed that the connection between devices is flaky. Often when connecting to a peer from a device running iOS 26, we can observe the invite coming through and when accepting said invite, both ends go to .connecting state and a while later go back to .notConnected within the peer(_ peerID: MCPeerID, didChange state: MCSessionState) function. This happens regularly, and retrying the invitation process several times usually resolves it.

Have you filed a bug on this, and if so, what is the bug number?

Does anyone have any information or guidance on how to resolve this issue?

Well, unfortunately, my (and Quinn's) longstanding advice has been to move to a new API and stop using MultipeerConnectivity. Quinn actually has an extended forum post describing how to move to the Network framework. I'd also suggest taking a look at the "Building a custom peer-to-peer protocol" sample, which uses the Network framework to implement something very similar to what MultipeerConnectivity provides.

One last comment I'd make on this. Many developers have been reluctant to take this advice because they're concerned about the work involved and that they'll end up with exactly the same issues they were originally having with MultipeerConnectivity. However, in practice, every developer I've helped through this transition has had exactly the same experience. That is:

  • They found the "lower level" APIs simpler to understand and work with. In many cases, their new implementation was half the length or less of their original implementation.

  • The issues they were previously having with MultipeerConnectivity simply did not happen.

  • They were able to add new functionality* with minimal additional effort.

*One particular feature I'd highlight here is the ability to easily DISABLE p2p Wi-Fi, relying entirely on bonjour over infrastructure Wi-Fi. Quinn has a post here describing why that's so useful.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Multipeer Connectivity connection is flaky on iOS 26
 
 
Q