"would like to find and connect to devices on your local network" error with inbound CFSocket connection

Viewed 55

We have an IOS application which only listens on a INADDR_ANY socket connection for inbound connection using CFSocketCreate/CFSocketGetNative/CFSocketCreateRunLoopSource/CFStreamCreatePairWithSocket etc (to display debug information via HTTP).

(So it falls into the category "Listening for and accepting incoming TCP connections").

If the first incoming socket connection happens on a new installed app we run into the error mentioned above. As we do neither use Bonjour nor getpeername() I wonder where the problem is. Obviously it doesn't matter how the dialog is closed, our program works. But it is of course annoying for us (QA is harder) and our customers.

Any idea what could be the problem ? I looked into all the questions related here, but I think we are not using one of the 'banned' APIs triggering the dialog

If I set a breakpoint to the stream:handleEvent: function of the NSStreamDelegate the popup appears before NSStreamEventOpenCompleted, so it appears some internals of the NSStream processing cause this.

on the debug console this appears btw: [connection] nw_connection_copy_connected_path [C1] Client called nw_connection_copy_connected_path on unconnected nw_connection 2022-04-06 17:28:55.811551+0200 GenMob[35630:3181485] [] tcp_connection_is_cellular No connected path

I did fiddle together a small demo app downloadable from https://github.com/leopatras/cfsocket.

0 Answers
Related