开发者

Documented Methods of Retrieving System Information

开发者 https://www.devze.com 2023-03-22 04:14 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消