IOS – How to identify the originator of an URL call under iOS/iPadOS

iosipadosmultitaskingPROXYurl

I am sometimes testing my apps on iPhone/iPad with Charles http PROXY to debug URL calls. I have noticed, that when I lock my iPhone and Charles is still running, I can see various URL connect calls to some sites in regular intervals. For some of the calls I can guess the app that is making the call, but some calls it does not ring a bell.

On Linux I have commands to find all open ports/connections and corresponding processes and I seek an equivalent way to do this on iOS/iPadOS.

How can I find the originator process or app for these calls?

Best Answer

If you have a jailbroken iOS/iPadOS device, you can use the command "lsof" to find out which process has that specific port open.

You would run it like this:

lsof -n -iTCP

It would list ports that the process has open with the mark "(LISTEN)" at the end. Outgoing connections would be marked differently depending on their state, typically "(ESTABLISHED)", "(CLOSED)" or various wait states.