I am developing an app which heavily relies on TCP device to device connections in the local network. The devices (multiple iPhones 13) are connected through a common consumer wifi router and act as server and client simultaneously.
My problem is that 2 out of 3 iPhones can't establish outgoing TCP connections. However, they can act as server and accept incoming connections.
All devices have the same iOS version (17.5.1) and access to Local Network is granted in the Privacy & Security settings. All devices have IPs in the range 192.168.x.x and the correct subnet is set. Safari can connect to IPs in the local network but not my app. The wifi network does not provide access to internet. Mobile data is turned off on all devices.
As the error is happening out in the field, I cannot reproduce it under controlled conditions.
What settings (beside not granting access to Local Network) may block outgoing connections to local IPs?
What configurations of the app (e.g. entries in Info.plist) may result in or fix this behaviour?