Hi, I’m having an issues on iOS 14 with calls to TcpClient client = new TcpClient("some.remote.host.com", 10161) is causing a local network permission requirement that reads "App ... would like to find and connect to devices on your local network".
If the user select “Don't allow” network access is denied and the app can not connect to our remote server.
I’ve tested this on both Unity 2019.2.12f1 and 2020.1.11f1 with Xcode 12.1 (12A7403) with the same result on each.
I was suspicious that it could have been caused by hitting the local DNS server (on local network) but performing a manual IPAddress[] serverIPs = Dns.GetHostAddresses(url); succeeds without issue and calling TcpClient.connect(...) with the returned IP address failed with the same issue.
I understand that iOS 14 has new privacy requirements and permissions are required to access machines on the local network but this should not fall into that category as we’re only connecting to remote hosts.
This is a total show stopper for our networked games.
Note, I’ve done more testing and it appears to occur when we use the port number 10161 that our server is listening on. Connecting to port 80 does not trigger this network permission requirement.
Now that I read the post, We have been experiencing connectivity issues with CloudKit with some betatesters, the error on the exceptions was CKCode 3 which means network not available, even when that user had 4G .
Im wondering now if this could be the case.
I’m trying to correlate it with a bug I’ve found so if you don’t mind… Does it happen both connected to wifi and using 3g/4g ?
Which iOS version is happening with ? 4.0 , 4.0.1 , 4.2 ?
Thank you very much, please keep us updated about this
Just in case anyone is interested, we’ve solved this issue.
The issue is that that port (10161) is reserved for SNMP over TLS and due to this was included in the list of criteria that will flag local network access.
This has been confirmed by Apple and they’ve indicated that after investigating further they intend on removing this restriction in a later version of iOS (it’s not yet in any seeded release).
I gotta say, feeling rather unlucky to be allocated one of the very few ports of the 65535 we could have been allocated that caused this issue!