What is included in `excludeDeviceCommunications`?

Thanks for being here!

What is the behavior of this flag? The documentation is scant, to say the least.

Answered by Engineer in 891769022

Thankyou for pointing out the missing documentation for excludeDeviceCommunication. We will definitely fix that. Here is the brief description:

If includeAllNetworks is set to YES and this property is set to YES, then network traffic used for communicating with devices connected via USB or Wi-Fi is excluded from the tunnel. For example, Xcode uses a network tunnel to communicate with connected development devices like iPhone, iPad and TV. The default value of this property is YES.

Request for better documentation on this was filed as FB14113991, in case that is useful.

My Take : this flag has almost no documentation, so sharing what's inferable from related APIs.

Based on the naming convention alongside excludeCellularServices, excludeDeviceCommunications most likely scopes out traffic from device-to-device communication frameworks — things like AirDrop, Continuity features (Handoff, Universal Clipboard), and possibly Bluetooth-based device sync — from whatever filtering or tunneling context this flag applies to (network extension or VPN config, presumably).

The practical reason this matters: if you're building a VPN or content filter and this flag isn't set correctly, you may inadvertently route or block local device-to-device traffic that users expect to bypass your tunnel entirely (like Handoff between their iPhone and Mac).

Given how scant the docs are, this seems like a good candidate for a one-on-one with the Networking team if you can grab a slot — the behavior likely has edge cases around Continuity that won't be fully captured in a forum reply.

— Divya Ravi, Senior iOS Engineer

Accepted Answer

Thankyou for pointing out the missing documentation for excludeDeviceCommunication. We will definitely fix that. Here is the brief description:

If includeAllNetworks is set to YES and this property is set to YES, then network traffic used for communicating with devices connected via USB or Wi-Fi is excluded from the tunnel. For example, Xcode uses a network tunnel to communicate with connected development devices like iPhone, iPad and TV. The default value of this property is YES.

What is included in `excludeDeviceCommunications`?
 
 
Q