Getting Hardware Details like CPU , GPU , Audio names in M1 and Intel Macs

Hi everyone, Does IOKit provide API's for fetching Hardware information from Apple devices. I am unable to implement the required methods, It would be helpful if someone could point me in the right direction. P.S. Is there any common API which could work on both M1 and older chips?

Replies

Is there any common API which could work on both M1 and older chips?

In general our APIs work the same regardless of the underlying CPU architecture.

Does IOKit provide API's for fetching Hardware information from Apple devices.

Yes. That would be the I/O Registry. For more background on this, read I/O Kit Fundamentals.

Having said that, there might be other APIs that better suite you specific needs. For example, if you want to list the available audio devices, there are audio APIs that are both easier to use and produce better results.

What is your goal is capturing this info? Do you intend to show it to the user? Or include it in a report? Or do you plan to change the behaviour of your code based on it?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"