Hi Quinn, I am developing an app that connects to a local device via Wifi or Ethernet.
I am using tcp over Network.framework for the communication. My network connector is configured as such for iOS:
let tcp_params = NWParameters.tcp
tcp_params.preferNoProxies = true
tcp_params.acceptLocalOnly = true
tcp_params.prohibitedInterfaceTypes = [.cellular]
So what happens is that everything is fine as long as both the iPhone and the device are connected to an AccesPoint. But there is another option where the device acts as AccessPoint and you can join that network straight. The device, since it has no connection to the internet, does not offer a default route - so that any client devices can still use cellular network to access the internet.
What happens though is that I cannot get a connection to that device in case cellular data is on. The state handler shows the following error message:
lC3 MINI-20001._cap._tcp.local. tcp, no cellular, prefer no proxy, attribution: developer, path unsatisfied (Denied over cellular interface), interface: pdp_ip0[lte], ipv4, ipv6, expensive]
As soon as I disable cellular data, everything works fine. Is there any way to get around this? There must be cause Safari can actually connect to the device even with cellular data on.
I have played with various ways to configure the NWParameters, but no luck.
Maybe you got the magic?
Cheers, Michael