Bug: Wi-Fi Aware (NAN) Subscriber Mode: nwPath.availableInterfaces Does Not Include nan0 Interface After Successful Peer Connection

When using the official Wi-Fi Aware demo app on iOS, with the iOS device configured as a NAN Subscriber, after successfully establishing a peer-to-peer connection with another device via Wi-Fi Aware (NAN), the network path object nwPath.availableInterfaces does not list the nan0 virtual network interface. The nan0 interface is the dedicated NAN (Neighbor Aware Networking) interface used for Wi-Fi Aware data communication. Its absence from availableInterfaces prevents the app from correctly identifying/using the NAN data path, breaking expected Wi-Fi Aware data transmission logic.

log: iOS works as subscriber: [onPathUpdate] newPath.availableInterfaces: ["en0"]

iOS works as publisher: [onPathUpdate] newPath.availableInterfaces: ["nan0"]

Answered by DTS Engineer in 880281022
we need to establish multiple additional NWConnection instances … over the Wi‑Fi Aware network

I don’t think you can do this on currently shipping systems. However, we’ve added support for it in iOS 26.4 beta. This is sufficiently ‘bleeding edge’ that the docs haven’t hit the Developer website yet. But the APIs are in the iOS 26.4 beta SDK (I’m using Xcode 26.4b3, build 17E5179g) and there’s documentation in Xcode itself.

To set up a listener:

let devices: WAPublisherListener.Devices = … specific devices …
let listener = try NetworkListener(for:
   .wifiAware(.addingConnections(from: devices)),
using: .parameters({
   TCP()
}).localPort(12345))

On the client side, do this:

let connection: NetworkConnection<TCP> = … original connection …
guard let wifiAwareEndpoint = connection.currentPath?.remoteEndpoint?.wifiAware(port: 12345) else {
    // … handle the failure …
}
// … connect to that endpoint …

If you option click on addingConnections and wifiAware, you’ll get docs for each.

Oh, and you don’t want to hard code the port number here. Rather, let the listener choose an ephemeral port and then pass the port number to the client via your initial Wi-Fi Aware connection.


As you might imagine, I haven’t actually test this for myself yet. But it’s in the SDK and AFAIK it should work.


send URLSession requests

How does URLSession fit into this? AFAIK you can’t configure URLSession to run over a specific interface, let alone Wi-Fi Aware.

Share and Enjoy

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

breaking expected Wi-Fi Aware data transmission logic.

Breaking whose logic. Logic within the system frameworks? Or your own app’s logic?

Share and Enjoy

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

Sorry for the typo earlier. To clarify: after connecting via Wi‑Fi Aware, we need to establish multiple additional NWConnection instances and send URLSession requests over the Wi‑Fi Aware network. However, we’re encountering a system "Nexus assignment error" when attempting to create NWConnections using the nan0 interface. Could you please demonstrate how to properly establish these extra NWConnections and send URLSession data through them?

we need to establish multiple additional NWConnection instances … over the Wi‑Fi Aware network

I don’t think you can do this on currently shipping systems. However, we’ve added support for it in iOS 26.4 beta. This is sufficiently ‘bleeding edge’ that the docs haven’t hit the Developer website yet. But the APIs are in the iOS 26.4 beta SDK (I’m using Xcode 26.4b3, build 17E5179g) and there’s documentation in Xcode itself.

To set up a listener:

let devices: WAPublisherListener.Devices = … specific devices …
let listener = try NetworkListener(for:
   .wifiAware(.addingConnections(from: devices)),
using: .parameters({
   TCP()
}).localPort(12345))

On the client side, do this:

let connection: NetworkConnection<TCP> = … original connection …
guard let wifiAwareEndpoint = connection.currentPath?.remoteEndpoint?.wifiAware(port: 12345) else {
    // … handle the failure …
}
// … connect to that endpoint …

If you option click on addingConnections and wifiAware, you’ll get docs for each.

Oh, and you don’t want to hard code the port number here. Rather, let the listener choose an ephemeral port and then pass the port number to the client via your initial Wi-Fi Aware connection.


As you might imagine, I haven’t actually test this for myself yet. But it’s in the SDK and AFAIK it should work.


Coming back to this:

send URLSession requests

How does URLSession come into this? AFAIK you can’t configure URLSession to run over a specific interface, let alone Wi-Fi Aware.

Share and Enjoy

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

we need to establish multiple additional NWConnection instances … over the Wi‑Fi Aware network

I don’t think you can do this on currently shipping systems. However, we’ve added support for it in iOS 26.4 beta. This is sufficiently ‘bleeding edge’ that the docs haven’t hit the Developer website yet. But the APIs are in the iOS 26.4 beta SDK (I’m using Xcode 26.4b3, build 17E5179g) and there’s documentation in Xcode itself.

To set up a listener:

let devices: WAPublisherListener.Devices = … specific devices …
let listener = try NetworkListener(for:
   .wifiAware(.addingConnections(from: devices)),
using: .parameters({
   TCP()
}).localPort(12345))

On the client side, do this:

let connection: NetworkConnection<TCP> = … original connection …
guard let wifiAwareEndpoint = connection.currentPath?.remoteEndpoint?.wifiAware(port: 12345) else {
    // … handle the failure …
}
// … connect to that endpoint …

If you option click on addingConnections and wifiAware, you’ll get docs for each.

Oh, and you don’t want to hard code the port number here. Rather, let the listener choose an ephemeral port and then pass the port number to the client via your initial Wi-Fi Aware connection.


As you might imagine, I haven’t actually test this for myself yet. But it’s in the SDK and AFAIK it should work.


send URLSession requests

How does URLSession fit into this? AFAIK you can’t configure URLSession to run over a specific interface, let alone Wi-Fi Aware.

Share and Enjoy

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

Bug: Wi-Fi Aware (NAN) Subscriber Mode: nwPath.availableInterfaces Does Not Include nan0 Interface After Successful Peer Connection
 
 
Q