simonmitchell / rocc

A Swift framework for remote control of digital Cameras
MIT License
123 stars 15 forks source link

Investigate migrating SSDP code to NWConnectionGroup on iOS 14 #32

Open simonmitchell opened 4 years ago

simonmitchell commented 4 years ago

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.