I am looking for allowed or documented APIs that will let me gather basic system and hardware information (CPU Speed, RAM, etc..) for a OS X application, all the information is available in the system profiler, but I would much rather programmatically retrieve the data in a way which Apple will be OK with.
开发者_JS百科I have searched around and not really found anything, just wondering if anybody knows different.
Use the command-line tool system_profiler which comes with every mac.
system_profiler -xml
will dump the same info the standard GUI system profiler app in a nice XML format.
精彩评论