Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find available USB devices Mac OS X

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

Thanks

like image 451
Michael Amici Avatar asked Jan 05 '11 22:01

Michael Amici


1 Answers

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.

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.

like image 79
John Parker Avatar answered Oct 08 '22 01:10

John Parker