getting device manufacturer name and device serial number programatically in mac

Hi,

I am an absolute beginner at IOKit registry and have a usecase to obtain the device manufacturer name, device serial number and device USB vendor name progrmatically. I m able to obtain the same using ioreg command but I wanted to get these values within my program. Thanks in advance.

Device serial number:

ioreg -rd1 -c IOPlatformExpertDevice | grep 'IOPlatformSerialNumber'

Device manufacturer name:

ioreg -rd1 -c IOPlatformExpertDevice | grep 'manufacturer'

USB device vendor names:

ioreg -rd1 -c IOUSBHostDevice | grep "USB Vendor Name"

I am an absolute beginner at IOKit registry

What language are you working in?

Share and Enjoy

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

getting device manufacturer name and device serial number programatically in mac
 
 
Q