查找可用的USB设备Mac OS X.

时间:2021-09-19 16:54:12

I was wondering if there was any way to see if a usb device (only specific ones) are plugged in and unplugged using objective c. All I need to know is if a device has been plugged in, such as an iPhone/iPod Touch. If not, any other device will work

我想知道是否有任何方法可以查看usb设备(仅特定的设备)是否插入并使用目标c拔出。我需要知道的是,是否已插入设备,例如iPhone / iPod Touch。如果没有,任何其他设备都可以工作

Thanks

1 个解决方案

#1


8  

The information in Apple's USB Device Interface Guide (see the "USB Devices on Mac OS X" and "Finding USB Devices and Interfaces" sections) and Accessing Hardware From Applications (see the "Finding and Accessing Devices" section) docs should put you on the right track.

Apple的USB设备接口指南(请参阅“Mac OS X上的USB设备”和“查找USB设备和接口”部分)和从应用程序访问硬件(请参阅“查找和访问设备”部分)文档中的信息应该可以帮助您正确的轨道。

That said, I suspect you'll need to delve below the shiny Cocoa surface into the world of I/O Kit functions and (potentially) POSIX.

也就是说,我怀疑你需要在闪亮的Cocoa表面下钻研到I / O Kit功能和(可能)POSIX的世界。

#1


8  

The information in Apple's USB Device Interface Guide (see the "USB Devices on Mac OS X" and "Finding USB Devices and Interfaces" sections) and Accessing Hardware From Applications (see the "Finding and Accessing Devices" section) docs should put you on the right track.

Apple的USB设备接口指南(请参阅“Mac OS X上的USB设备”和“查找USB设备和接口”部分)和从应用程序访问硬件(请参阅“查找和访问设备”部分)文档中的信息应该可以帮助您正确的轨道。

That said, I suspect you'll need to delve below the shiny Cocoa surface into the world of I/O Kit functions and (potentially) POSIX.

也就是说,我怀疑你需要在闪亮的Cocoa表面下钻研到I / O Kit功能和(可能)POSIX的世界。