Any summaries of "NetworkConnection"?

I heard that the Network framework can help using networking with Swift concurrency. I read up on "NWConnection," which uses a DispatchQueue. I was wondering how queues fit together with concurrency, then I heard about a related class, "NetworkConnection."

I realized that the new class is in the same module, but introduced for macOS 26. I saw the WWDC25 video about it, but it assumed that I already knew about its result-builder connection setup. I don't; was it introduced in an earlier video?

A lot of times, I find a web article soon after some WWDC that explains how to actually a new API. The problem is that the class' name is un-Google-able, being two actual words concatenated together that can reasonably be found together.

Does anyone have a link of a post-WWDC25 article explaining NetworkConnection?

Answered by DTS Engineer in 904344022

TN3151 Choosing the right networking API has a good summary of the networking APIs available on Apple platforms. It also has a Network framework API choices section that summarises the three different variants of the Network framework API.

WWDC 2025 Session 250 Use structured concurrency with Network framework is a good introduction to the latest Network framework API, the one introduced in appleOS 26. The video page has links to various resources in its About tab and lots of code snippets in its Code tab.

If you’re looking for sample code, check out the Building peer-to-peer apps. This takes advantage of the integration between Wi-Fi Aware and these new Network framework APIs, but the Network framework bits are useful in and of themselves.

Finally, TN3213 Moving from Multipeer Connectivity to Network framework discuss this API in some detail. This is in the context of an app moving away from the now-deprecated Multipeer Connectivity framework but, again, the Network framework bits are independently useful.

Share and Enjoy

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

Have you run a search about NWConnection? I opened a ticket about it two, three or four years ago with some old lines of code involving DispatchQueue if I remember correctly.

I was wondering how queues fit together with concurrency

They do not.

I realized that the new class is in the same module, but introduced for macOS 26. I saw the WWDC25 video about it, but it assumed that I already knew about its result-builder connection setup. I don't; was it introduced in an earlier video?

I think NetworkFramework is just a Swift-friendly wrapper, based on Swift concurrency rather than GCD. Unfortunately, these network frameworks are constantly in flux. If you're planning some relatively simple operation, there are likely some better APIs to use.

A lot of times, I find a web article soon after some WWDC that explains how to actually a new API.

I think that world is gone forever. Who's going to bother writing those web articles when the AIs just going to steal and launder it?

TN3151 Choosing the right networking API has a good summary of the networking APIs available on Apple platforms. It also has a Network framework API choices section that summarises the three different variants of the Network framework API.

WWDC 2025 Session 250 Use structured concurrency with Network framework is a good introduction to the latest Network framework API, the one introduced in appleOS 26. The video page has links to various resources in its About tab and lots of code snippets in its Code tab.

If you’re looking for sample code, check out the Building peer-to-peer apps. This takes advantage of the integration between Wi-Fi Aware and these new Network framework APIs, but the Network framework bits are useful in and of themselves.

Finally, TN3213 Moving from Multipeer Connectivity to Network framework discuss this API in some detail. This is in the context of an app moving away from the now-deprecated Multipeer Connectivity framework but, again, the Network framework bits are independently useful.

Share and Enjoy

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

Any summaries of "NetworkConnection"?
 
 
Q