0

Is it possible to receive a list of all established connections in Swift like when using the "lsof" command?

I just saw that system calls (using Process) are not allowed in the Sandbox (which makes sense...).

inexcitus
  • 2,471
  • 2
  • 26
  • 41
  • 1
    You may still be able to do this today using `sysctlbyname`, but Apple has explicitly said that this is an oversight, and they intend this to be blocked for sandboxed apps. https://forums.developer.apple.com/thread/25994. For an example of how to do this with `sysctlbyname`, see http://stackoverflow.com/questions/8176839/how-to-get-tcp-udp-opening-port-list-on-iphone-by-objective-c – Rob Napier Mar 26 '17 at 17:54
  • Thank you, looks promising :) – inexcitus Mar 26 '17 at 18:05

0 Answers0