I’m trying to implement chat feature in my mobile app and I faced a problem with WebSocket connection on release build.
I followed instructions from here:
and build the functionality into my app.
The bidirectional communication works on the development build (simulator and device) and I can receive the messages in real time. When I build a release build, the real-time communication is not working. Azure client is throwing no exception, all I found in system logs is something like this:
nw_endpoint_flow_failed_with_error [C14.1.1.1 146.75.121.155:443 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: en0[802.11], ipv4, dns, uses wifi)] already failing, returning
The IP address:
146.75.121.155:443
I suspect that is the address of the WebSocket connection, which is terminated by iOS Network restrictions on the release build. That IP is different every time I open the chat.
I tried to open these addresses in browser and noticed certificate problem: Certificate Error
(please don’t mind that IP on screenshot differs from the one I pasted).
I tried for test purposes set the flag:
NSAllowsArbitraryLoads
but it didn’t helped either.
I’m out of leads, why this Azure Client is not working, had anyone tried such scenario and had this problem?