Hi,
I'm posting because I didn't notice any discussion about the changes to network privacy in iOS 14. There is an
Apple Developer Forum Thread where myself and others have been trying to convince Apple to make some changes but I doubt we will be successful before the GM release of 14.0.
As of iOS 14.0 beta 4, applications require user permission in order to communicate with devices on the local network. Your application may be impacted if you use WebRTC to communicate directly with other Peers (as opposed to a star with an SFU or MCU in the middle). For example, the following cases will trigger a permissions request.
1. Gathering mDNS host candidates.
2. Resolving mDNS host candidates.
3. Sending STUN requests or responses to host candidates that are within your local network prefix.
4. Communicating via an HTTPS proxy or TURN server where the client address is within your local network prefix.
If permissions are declined, then accessing the local network usually results in the offending UDP or TCP socket being closed with an error. The kicker is that there is no Apple API to determine the user's permissions before creating a PeerConnection. To add further insult to injury, Mobile Safari seems to be exempt from the new permissions checks and happily uses the local network.
I'm curious how others have been thinking about this problem. In the case of Twilio we have been leaning towards filtering remote host candidates when we know the other party is not a media server and gathering server reflexive and relay candidates as early as possible. There are more complex filtering strategies that could yield more usable host candidates but I am hopeful that there is a better solution to this problem in the long term.
Best,
Chris