osx - Get all system information on OS X -


is there class/function gets me whole system information object?

with system information object mean data can see if open system information app on os x.

i have found few classes far, gives me information, not all.

i fear there no class can give me information @ once since have not found in documentation yet, might have overseen since pretty new os x development , not yet familiar sdks.

call system_profiler on nstask

let task = nstask() let outputpipe = nspipe()  task.launchpath = "/usr/sbin/system_profiler" task.arguments = ["-xml", "-detaillevel", "mini"] task.standardoutput = outputpipe task.launch() let outputdata = outputpipe.filehandleforreading.readdatatoendoffile()  let output = nsstring(data: outputdata, encoding: nsutf8stringencoding) as! string print(output) 

this syntax returns minimum information property list.
further information other detaillevel values see man page


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -