I was excited about the new APIs added to Network.framework
in iOS 26 that offer structure concurrency support out of the box and a more modern API design in general.
However I have been unable to use them to create a device-to-device QUIC connection.
The blocker I ran into is that NetworkListener
's run
method requires the network protocol to conform to OneToOneProtocol
, whereas QUIC conforms to MultiplexProtocol
. And there doesn't seem to be any way to accept an incoming MultiplexProtocol
connection? Nor does it seem possible to turn a UDP connection into a QUIC connection using NetworkConnection.prependProtocols() as that also only works for network protocols conforming to OneToOneProtocol
.
I suspect this is an accidental omission in the API design (?), and already filed a Feedback (FB18620438).
But maybe I am missing something and there is a workaround or a different way to listen for incoming QUIC connections using the new NetworkListener
?
QUIC.TLS
has methods peerAuthenticationRequired(Bool)
and peerAuthenticationOptional(Bool)
, which makes me think that peer to peer QUIC connections are intended to be supported?
I would also love to see documentation for those methods. For example I wonder what exact effect peerAuthenticationRequired(false)
and peerAuthenticationOptional(false)
would have and how they differ.
For the moment I recommend that you hold on on trying to use QUIC with the new Network framework API that we introduced at WWDC 2025. The relationship between that API and multiplexed protocols is still evolving.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"