Enabling a multipathServiceType in NWParameters on iOS 17.x+ breaks establishing peer to peer NWConnections

We've been using network framework for peer to peer connectivity since iOS 15. Since the introduction of iOS 17 we've been getting the following for our NWListener when attempting to establish a connection with any multipathServiceType enabled. We're not doing anything special here. On iOS 17.x devices (we've tested 17.1, 17.2, 17.4) we simply enable multipath services by adding the multipath capability and then setting multipathServiceType to .handover or .interactive on our NWParameters. The devices never connect when we try establish an NWConnection. This works on all non-iOS 17.x devices.

This is reproducible using the Apple Peer-to-Peer NWConnection TicTacToe sample code.

Replies

[Removed] this was an attempt to post the console output from the error above

I tried to add my console output with the network error stack trace for the issue multiple times but the forum keeps deeming it "sensitive" so I'm add it as a .txt here.

Using Multipath TCP in a peer-to-peer app is a bit strange. Most folks only care about MPTCP in the context of Wi-Fi and WWAN.

Regardless, if this previously worked and has broken on iOS 17, you should file a bug about that. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Done and done. Feedback ID: FB13401552 (Enabling a multipathServiceType in NWParameters on iOS 17.x+ breaks establishing peer to peer NWConnections)

You're totally right, we originally didn't have it enabled at all. We eventually noticed that with multipath enabled we were getting a faster rate of sending data over the NWConnection using func send(content: Data?, contentContext: NWConnection.ContentContext = .defaultMessage, isComplete: Bool = true, completion: NWConnection.SendCompletion).

FB13401552

Much appreciated.

We eventually noticed that with multipath enabled we were getting a faster rate of sending data

Oh, that’s interesting. I suspect that MPTCP allows seamless switching between the peer-to-peer Wi-Fi interface and the infrastructure Wi-Fi interface. That’s cool, and it should speed things up because the infrastructure Wi-Fi interface is faster.

However, that’s really just a guess. You’d need to look at a packet trace to tell for sure.

Regardless, disabling MPTCP is an easy workaround.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"