Small update. I changed the ip address of the initial broadcast message to the server so that it unicasts, and it works. Does ios handle broadcast udp differently?
func connect() {
let host = "10.11.21.100"
More research. Could this be the issue?
https://developer.apple.com/forums/thread/685690
If the reply is coming from the server (10.11.21.100) and the ip doesn't match the broadcast ip (10.11.21.255), could NW be ignoring it?