Hello everyone,
Last year I built an application for tvOS and iPadOS that enables device-to-device communication. I based it on Apple’s sample code, available here: https://developer.apple.com/documentation/Network/building-a-custom-peer-to-peer-protocol
At that time, everything worked flawlessly. However, this year I had to revisit the project to add new features, and now it no longer works as expected. The first time the app runs it connects fine, but if we relaunch it (on either the iPad, the Apple TV, or both), the connection fails.
Most importantly, this is not an issue with my own code — I tested it directly with the original Apple sample code, and the exact same problem occurs there too.
Here’s what I see in the logs:
nw_endpoint_flow_setup_channel [C1 TicTacToe,65E91B02-890E-4D30-88B8-CE2AB9677BF9 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: utun0, scoped, ipv6)] nexus assignment error Connection refused
nw_endpoint_flow_failed_with_error [C1 TicTacToe,65E91B02-890E-4D30-88B8-CE2AB9677BF9 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: utun0, scoped, ipv6)] already failing, returning
code-block
This happens right after I select the iPad from the device list and try to connect.
What’s strange is that the interface being used is utun0. I don’t have a VPN or iCloud Private Relay enabled. I also tried running the app through the iPad’s personal hotspot, but I get the same error. The only workaround I’ve found so far is to restart the Apple TV.
Has anyone else run into this problem? Is there any known solution or workaround?
Tested on tvOS 18.6 and iPadOS 18.3.2 / 18.6.
I tested it directly with the original Apple sample code, and the exact same problem occurs there too.
Well, that’s not good. Please file a bug about that, and then post the bug number here. Once I get your bug number, I’ll be able to dig into this further.
Make sure to include:
- Sysdiagnose logs taken shortly after seeing the problem.
- A rough timeline of events, so when you were able to successfully connect the first time and when you failed to connect the second time.
Also, if you’re able to try this with iOS 26 beta and tvOS 26 beta, that’d be a useful data point. If not, it’s fine to file this against {i,tv}OS 18.6.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"