Search code examples
objective-cxcodemacosnsarraynsworkspace

Objective C code for background processes


I have used NSApplication and NSWorkspace to get a list of running applications.

But it is only giving me the applications that are active from the administrator and not the root processes that run in the background.

I want to get a list of all running processes and keep updating that list as soon as a new process spawns.

I prefer not to use NSTask and parsing the output.

Is there a fix for this?

NSArray * runningapps = [[NSWorkspace sharedWorkspace] runningApplications];

Solution

  • Refer to the website given below : https://github.com/objective-see/ProcInfo