I'm running the 10.14 (Mojave) beta with Xcode 10 and trying to use the new Network framework. I'm able to send UDP packets to a normal ipv4 address but when I try to send to the IPv4Address.broadcast address I receive a send completed, error = POSIXErrorCode: Permission denied
In other networking code I have to explicitly enable broadcasts but I can't find any similar option in the new Network framework.
Can the new framework do UDP broadcast? If so, how to enable it?
Thank you
Network.framework doesn't currently have support for UDP multicast or broadcast. There are a number of challenges around broadcast that may make it very difficult to use. IPv6 doesn't even have broadcast. If you can use multicast instead you will likely have much better success going forward. If you're interacting with something that requires broadcast, you might try sending to a subnet broadcast. Can you describe your use case a little more?
For any enhancement requests, such as broadcast support in Network.framework, please use https://bugreport.apple.com/. A detailed description of your use case will help. Thank you.