NWConnectionGroup is a much more usable API than CFSocket... CFSocket is ancient, and difficult to use, and means we have to handle network changes ourselves. If we can move over to using the Networking framework (At least on iOS 14 for now) we can remove some of the tricky reachability stuff we have going on and let Apple handle it for us.
Will need to think of a clever way to keep support for both so we can still support iOS < 14, perhaps making UDPClient a protocol and setting it using an if #available( statement in the initialiser of the UDP device discovery.
NWConnectionGroup is a much more usable API than CFSocket... CFSocket is ancient, and difficult to use, and means we have to handle network changes ourselves. If we can move over to using the Networking framework (At least on iOS 14 for now) we can remove some of the tricky reachability stuff we have going on and let Apple handle it for us.
Will need to think of a clever way to keep support for both so we can still support iOS < 14, perhaps making
UDPClient
a protocol and setting it using anif #available(
statement in the initialiser of the UDP device discovery.