UDP Connection issue after updating Xcode 15.3

I am using UDP communication in a app. Here is what i do,

  • Initialises a UDP broadcast connection object.
  • Bind it with a port to listen
  • Receives the IP & Port from the UDP connection to connect further with TCP connection.

After updating Xcode 15.3, It works until the iPad is connected with mac in debug mode. When i create build to test remotely, it stops receiving IP & Port from UDP connection.

Here is how i concluded this is Xcode issue, I tried to debug this issue with Xcode 15.2 and it works as expected with debug and after creating build also.

Any help / suggestion would be appreciated.

Replies

It sounds like you’re implementing service discovery. I strongly recommend that you use Bonjour [1] for that. It’ll get you out of the business of dealing with broadcasts, which are very tricky to get right.

Is there something preventing you from using Bonjour here?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Bonjour is an Apple term for three industry-standard protocols: