Post

Replies

Boosts

Views

Activity

Reply to Get own socket port (NWConnection)
I would like to point out that there's currently a bug in iOS/VisionOS simulator which causes requiredLocalEndpoint to be ignored! https://openradar.appspot.com/FB13686829 The system simply chooses a random open port instead of using the one provided. Beware! It works fine on divice and on macOS itself though.
Mar ’25
Reply to Get own socket port (NWConnection)
I would like to point out that there's currently a bug in iOS/VisionOS simulator which causes requiredLocalEndpoint to be ignored! https://openradar.appspot.com/FB13686829 The system simply chooses a random open port instead of using the one provided. Beware! It works fine on divice and on macOS itself though.
Replies
Boosts
Views
Activity
Mar ’25
Reply to How to create and advertise a Bonjour service with Network.framework?
In case somebody also runs into this, I had the same issue (although I created the NWListener differently), and it turned out that the error was caused by an empty listener.newConnectionHandler. Set it before calling start, and it might fix it. Just in case I also had serviceRegistrationUpdateHandler set, although I don't know if it's required.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’25