How to create a program to list all the USB devices in a Mac?

前端 未结 3 878
小蘑菇
小蘑菇 2021-02-01 05:37

I have a limited exposure to the Mac OS X operating system and now I have started using Xcode and am studying about I/O kit. I need to create a program in Xcode under command li

3条回答
  •  清歌不尽
    2021-02-01 06:32

    If you run system_profiler SPUSBDataType it'll list all the USB devices connected to the system, you can then interact with that data either by dumping it into a text file or reading it from the command into the application and working with it there.

提交回复
热议问题