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.
Topic:
App & System Services
SubTopic:
Networking
Tags: