Am I reading the docs right that "Apple peer-to-wifi" is the replacement?
Yes, but not exactly. Peer-to-peer WiFi (more specifically, a technology called "AWDL") has long been the transport layer underneath MultipeerConnectivity (MPC). So it's not so much a "replacement" as it is "the same thing". I REALLY want to emphasize that last point— EVERYTHING MPC does has ALWAYS been possible through other APIs, so the deprecation of MPC does actually change anything about what's possible on our platform.
In terms of changing APIs, Quinn's "Moving from Multipeer Connectivity to Network Framework" actually covers how Network.framework handles all of this in great detail. However, I'd also suggest just taking a look at our "Building a custom peer-to-peer protocol". That sample basically duplicates exactly the kind of thing MPC does and, to be honest, I think the code is actually simpler and clearer than it would have been if you'd written it with MPC.
And that by using the "includePeerToPeer" property this will work. Would it be possible in this way that the Vision Pros discover and communicate with each other even if not connected to an AP?
I'm not sure which property you're looking at there, but, yes, setting NWParametersProvider.peerToPeerIncluded(_:) to "true" will enable direct communication between our devices, including the Vision Pro.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware